Skip to content

DOC: add color sequences reference example #29563

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
Feb 2, 2025

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Feb 1, 2025

PR summary

Introducing the Matplotlib Abacus!

image

I did not know that the color sequence registry was a thing. Once I did know, the next thing I wanted to know was what sequences are available. This PR adds an example showing all the built in sequences, analogous to the Colormaps reference and List of Named Colors.

I am in two minds whether to add a second plot with a newly registered color sequence or to leave this as a purely reference example of what is available by default.

PR checklist

@rcomer
Copy link
Member Author

rcomer commented Feb 1, 2025

New example

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

I like the style.

I am in two minds whether to add a second plot with a newly registered color sequence or to leave this as a purely reference example of what is available by default.

You can add a sentence that users can register their own sequences as well and point to register. IMHO an example is not too helpful here. The concept "register -> you can query it by name" is straigt forward. The plot itself will not be helpful as you cannot visualize "there's a new element in the registry". That can only be inferred from the associated example code. But as said, the concept is so simple that any example is dilluting the message because of the additional visualization code.

@rcomer rcomer force-pushed the doc-color-sequences branch from c2ae704 to 20d1900 Compare February 1, 2025 17:55
@rcomer
Copy link
Member Author

rcomer commented Feb 1, 2025

Did there used to be a Dark1?

@rcomer rcomer force-pushed the doc-color-sequences branch from 20d1900 to ae1359e Compare February 1, 2025 18:03
@rcomer
Copy link
Member Author

rcomer commented Feb 1, 2025

Updated new example

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Minor style suggestions.

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Take or leave the suggestions.

@rcomer rcomer force-pushed the doc-color-sequences branch from 8f08300 to c0cd916 Compare February 2, 2025 08:15
@timhoffm timhoffm added this to the v3.10.1 milestone Feb 2, 2025
@timhoffm timhoffm merged commit dd8dbca into matplotlib:main Feb 2, 2025
35 of 36 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Feb 2, 2025
@rcomer rcomer deleted the doc-color-sequences branch February 2, 2025 16:51
timhoffm added a commit that referenced this pull request Feb 2, 2025
…563-on-v3.10.x

Backport PR #29563 on branch v3.10.x (DOC: add color sequences reference example)
@ksunden ksunden mentioned this pull request Mar 3, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants