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

Add ten-color accessible color cycle as style sheet#27851

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
tacaswell merged 4 commits intomatplotlib:mainfrommpetroff:add-ccs-color-cycle
Aug 22, 2024

Conversation

mpetroff
Copy link
Contributor

PR summary

(Following up from email.)

Adds a style sheet with the ten-color color cycle survey palette from Petroff (2021) [which will be published in a journal eventually]:
https://arxiv.org/abs/2107.02270
https://github.com/mpetroff/accessible-color-cycles

Related to (but does not fix)#9460.

At the moment, this PR contains only the minimal changes. I've only added the ten-color sequence from the paper and only done so as a style sheet.

The paper additionally contains six- and eight-color sequences, which could also be added.

Would it be better to add to_BUILTIN_COLOR_SEQUENCES inlib/matplotlib/colors.py with data inlib/matplotlib/_cm.py instead of as a style sheet?

I'm also open to naming suggestions. The current name is the placeholder I've been using, withccs standing for "color cycle survey".

PR checklist

matthewfeickert, mxwell-dev, and emilyhunt reacted with hooray emoji
@tacaswell
Copy link
Member

I am very much in favor of taking this, but agree the name needs some workshopping.

We may also want to add these sequence(s) to

_BUILTIN_COLOR_SEQUENCES= {
'tab10':_cm._tab10_data,
'tab20':_cm._tab20_data,
'tab20b':_cm._tab20b_data,
'tab20c':_cm._tab20c_data,
'Pastel1':_cm._Pastel1_data,
'Pastel2':_cm._Pastel2_data,
'Paired':_cm._Paired_data,
'Accent':_cm._Accent_data,
'Dark2':_cm._Dark2_data,
'Set1':_cm._Set1_data,
'Set2':_cm._Set1_data,
'Set3':_cm._Set1_data,
}

matthewfeickert reacted with thumbs up emoji

@tacaswelltacaswell added this to thev3.10.0 milestoneMar 4, 2024
@tacaswell
Copy link
Member

If it is ready in the next week or so, it can go in 3.9, but I think it is important to get the names and such rather rather than rushing it through.

@kpedro88
Copy link

@mpetroff great to see this! As a user, I am in favor of adding the 6- and 8-color cycles.

mxwell-dev, matthewfeickert, and syrte reacted with thumbs up emoji

Copy link
Contributor

@matthewfeickertmatthewfeickert left a comment

Choose a reason for hiding this comment

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

Given the discussion inmpetroff/accessible-color-cycles#1 this PR would adopt thepetroffX name scheme.

@tacaswell
Copy link
Member

I took the liberty of accepting the naming change, adding it to the sequence registry, and fixing the rebase.

matthewfeickert and mpetroff reacted with thumbs up emoji

@matthewfeickert
Copy link
Contributor

@mpetroff can we get an approval from you that you're good with the name changes discussed inmpetroff/accessible-color-cycles#1 that were adopted here?

@mpetroff
Copy link
ContributorAuthor

@mpetroff can we get an approval from you that you're good with the name changes discussed inmpetroff/accessible-color-cycles#1 that were adopted here?

Yes, I'm good with it.

matthewfeickert reacted with thumbs up emoji

@matthewfeickert
Copy link
Contributor

@tacaswell@mpetroff Can we rebase this offmain again as the CI seems to be fixed there now, and then this should be good to merge whenever.

Copy link
Member

@story645story645 left a comment
edited
Loading

Choose a reason for hiding this comment

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

This can be done in a followup, but would be nice if this got added to the following for discoverability:

ETA: also I'm really psyched this is going in, thanks for your work on this folks!

matthewfeickert, jonas-eschle, and syrte reacted with thumbs up emoji
@tacaswelltacaswell merged commit1056e0f intomatplotlib:mainAug 22, 2024
43 checks passed
@tacaswell
Copy link
Member

I went ahead and merged this and opened issue for the additional examples / documentation.

matthewfeickert and mpetroff reacted with hooray emoji

@tacaswell
Copy link
Member

Thank you@mpetroff !

matthewfeickert reacted with heart emoji

@mpetroffmpetroff deleted the add-ccs-color-cycle branchAugust 22, 2024 17:34
@matthewfeickert
Copy link
Contributor

Probably the wrong place to ask this, butpetroff10 landed in Matplotlibv3.10.0

https://matplotlib.org/stable/users/prev_whats_new/whats_new_3.10.0.html#new-more-accessible-color-cycle

so we can now do

importmatplotlib.pyplotaspltplt.style.use("petroff10")petroff10

which is great. 🚀 (Also nicepetroff10 style sheet example!)

For some high energy physics training sessions the 6 color scheme is sometimes demoed (c.f. themplhep example from the 2024 USCMS/IRIS-HEP Analysis Software Training). To do a 6 color cycle should one just truncate the 10 color cycle?

@timhoffm
Copy link
Member

The 6 color sequence by Petroff is not just a truncated 10 color sequence. It has distinct colors. You can read thrombus here and make a custom color sequencehttps://arxiv.org/abs/2107.02270.

matthewfeickert and mpetroff reacted with thumbs up emoji

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

@matthewfeickertmatthewfeickertmatthewfeickert requested changes

@tacaswelltacaswelltacaswell approved these changes

@story645story645story645 approved these changes

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

Successfully merging this pull request may close these issues.

6 participants
@mpetroff@tacaswell@kpedro88@matthewfeickert@timhoffm@story645

[8]ページ先頭

©2009-2025 Movatter.jp