Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: Better visualization for the default color cycle example #28888

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Sep 25, 2024

The current visualization is quite messy (
https://matplotlib.org/stable/gallery/color/color_cycle_default.html).

Let's focus on:

  • giving a one clear sequence
  • giving the color names as 'CN' notation and named colors
  • showing lines and patches (colors appear substantially different in thin lines and filled areas)

And don't bother with:

  • multiple line widths - they are only a slight visual variation (compared to patches) and multiple widths clutter the example
  • black background: It's enough to show the default color cycle on the default background.

New rendered example:
grafik

@github-actions github-actions bot added the Documentation: examples files in galleries/examples label Sep 25, 2024
@timhoffm timhoffm force-pushed the doc-colors branch 2 times, most recently from a43f217 to e4b68de Compare September 25, 2024 22:28
Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost like this more for the color reference docs than the gallery, but definitely agree that this is a more informative image

@timhoffm
Copy link
Member Author

I almost like this more for the color reference docs than the gallery, but definitely agree that this is a more informative image

We also have "Colormap reference" and "List of named colors" in the gallery. They are likewise a reference. It you want to move them, all three should move together. But that's for another time. I'm only concerned with a better visual representation of the content for now.

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, a minor thing, but since we normally read top-to-bottom, maybe the colours should have C0 at the top?

Comment on lines 15 to 17
def f(x, a):
return 0.85 * a * (1 / (1 + np.exp(-x)) + 0.2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what this is from reading it (though I do understand from the final image). Maybe could do with a comment or docstring.

The current visualization is quite messy (
https://matplotlib.org/stable/gallery/color/color_cycle_default.html).

Let's focus on:
- giving a one clear sequence
- giving the color names as 'CN' notation and named colors
- showing lines and patches (colors appear substantially different
  in thin lines and filled areas)

And don't bother with:
- multiple line widths - they are only a slight visual variation
  (compared to patches) and multiple widths clutter the example
- black background: It's enough to show the default color cycle on
  the default background.
Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gonna leave this in case @QuLogic still has feedback but yay is really nice!

@QuLogic QuLogic merged commit 7722dea into matplotlib:main Sep 27, 2024
22 checks passed
@QuLogic QuLogic added this to the v3.10.0 milestone Sep 27, 2024
@timhoffm timhoffm deleted the doc-colors branch September 28, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: examples files in galleries/examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants