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

Skip to content

DOC: clarify source of Cn colors - #32049

Merged
timhoffm merged 3 commits into
matplotlib:mainfrom
sahilmathur254:fix/32004-bug-set-prop-cycle-does-not-affect-c
Jul 28, 2026
Merged

DOC: clarify source of Cn colors#32049
timhoffm merged 3 commits into
matplotlib:mainfrom
sahilmathur254:fix/32004-bug-set-prop-cycle-does-not-affect-c

Conversation

@sahilmathur254

@sahilmathur254 sahilmathur254 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PR summary

Clarify that Cn colors are resolved from the global rcParams['axes.prop_cycle'], not an Axes-local cycle configured with Axes.set_prop_cycle.

The existing phrase “default property cycle” was ambiguous because an Axes can have its own property cycle. This expands the existing note in the Color formats table.

Closes #32004

AI Disclosure

I used an AI-assisted coding tool to help draft the documentation wording and PR description. I reviewed the final diff and validation evidence and take responsibility for the contribution.

PR checklist

  • "closes [Bug]: set_prop_cycle does not affect Cn colors #32004" is in the body of the PR description
  • [N/A] new and changed code is tested — documentation-only change
  • [N/A] Plotting-related features are demonstrated in an example — no feature or behavior change
  • [N/A] New Features and API Changes are noted with a directive and release note
  • Documentation complies with the general documentation guidelines

@github-actions github-actions Bot added the Documentation: user guide files in galleries/users_explain or doc/users label Jul 16, 2026
@github-actions

Copy link
Copy Markdown

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process.

You can also join us on discourse chat for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@sahilmathur254
sahilmathur254 marked this pull request as ready for review July 16, 2026 19:00

@timhoffm timhoffm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This gets quite unwieldy:

Image

Comment on lines 64 to 65
| into the default property cycle. +--------------------------------------+
| | :rc:`axes.prop_cycle` |

@timhoffm timhoffm Jul 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the right way forward is

Suggested change
| into the default property cycle. +--------------------------------------+
| | :rc:`axes.prop_cycle` |
| into the default property cycle | |
| (:rc:`axes.prop_cycle`). | |

leaving the note unchanged.

Combined with #32071.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I’ve applied the suggested layout, keeping axes.prop_cycle in the description column while leaving the note unchanged. I also retained the blank separator required before the note directive so the table parses correctly.

@sahilmathur254

Copy link
Copy Markdown
Contributor Author

Hi @timhoffm , I’ve addressed your feedback and all checks pass. Could you please take another look when convenient?

Comment thread galleries/users_explain/colors/colors.py Outdated
@timhoffm
timhoffm merged commit d78c6c5 into matplotlib:main Jul 28, 2026
23 of 24 checks passed
@timhoffm

Copy link
Copy Markdown
Member

Thanks @sahilmathur254!

@QuLogic QuLogic added this to the v3.11.2 milestone Jul 28, 2026
@QuLogic

QuLogic commented Jul 28, 2026

Copy link
Copy Markdown
Member

@meeseeksdev backport to v3.11.x

QuLogic added a commit that referenced this pull request Jul 29, 2026
…049-on-v3.11.x

Backport PR #32049 on branch v3.11.x (DOC: clarify source of Cn colors)
clin1234 pushed a commit to clin1234/matplotlib that referenced this pull request Aug 23, 2026
* DOC: clarify source of Cn colors

* DOC: clarify source of Cn colors

* Update galleries/users_explain/colors/colors.py

---------

Co-authored-by: Tim Hoffmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: user guide files in galleries/users_explain or doc/users first-contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: set_prop_cycle does not affect Cn colors

3 participants