Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOC: Better doc of colors#22912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 5 commits intomatplotlib:mainfromlarsoner:colors
Apr 28, 2022
Merged

DOC: Better doc of colors#22912

timhoffm merged 5 commits intomatplotlib:mainfromlarsoner:colors
Apr 28, 2022

Conversation

larsoner
Copy link
Contributor

PR Summary

Improvehttps://matplotlib.org/3.5.0/gallery/color/named_colors.html by:

  1. Splitting colors into three sections so that they don't get put in amultiimg where each takes up half the horizontal space. This should make it much more readable.
  2. Add a.. contents so that each color category is easily accessible from the top.

You'll have to ignore my dark mode below since I took the3.5 one from the actual URL but built my changes locally:

3.5PR
contentsN/AScreenshot from 2022-04-26 17-18-28
colorsScreenshot from 2022-04-26 16-49-16Screenshot from 2022-04-26 17-18-36

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

story645 reacted with thumbs up emoji
@timhoffm
Copy link
Member

timhoffm commentedApr 26, 2022
edited
Loading

Side-remark: It would be really cool if one could specify that individual code sections can be/are folded (or maybe completely omitted?) in sphinx-gallery. This is one of the gallery entries in which only the generated figure is relevant not the code that is generating it.

story645 reacted with thumbs up emoji

@larsoner
Copy link
ContributorAuthor

Agreed, I openedsphinx-gallery/sphinx-gallery#953 in case someone wants to discuss further and possibly implement!

timhoffm reacted with thumbs up emoji

@tacaswelltacaswell added this to thev3.6.0 milestoneApr 27, 2022
@timhoffm
Copy link
Member

The section titles and figure titles are redundant now. I think we can leave the figure titles out then.

story645 reacted with thumbs up emoji

@larsoner
Copy link
ContributorAuthor

The section titles and figure titles are redundant now. I think we can leave the figure titles out then.

The only time I can see it being useful is if someone wants to save the image, or link to it from somewhere else, then the title is gone for them. But I'll remove it since this seems rare enough not to worry about

@timhoffmtimhoffm merged commit9c590de intomatplotlib:mainApr 28, 2022
@larsonerlarsoner deleted the colors branchApril 28, 2022 20:55
@timhoffm
Copy link
Member

@larsoner is there a recommended way to suppress unneeded output from a block in sphinx-gallery?

image

I could imagine:

  • Add an explicitplt.show()
  • Terminate the last line with a colon
  • Is there a sphinx-gallery flag to suppress the output

@larsoner
Copy link
ContributorAuthor

You could always do an assignment:

_ = plot_colortable(...)

But for that specific example an easy fix is tonot return the figure

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@story645story645story645 approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.0
Development

Successfully merging this pull request may close these issues.

4 participants
@larsoner@timhoffm@story645@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp