Skip to content

DOC: clarify source of Cn colors#32049

Open
sahilmathur254 wants to merge 2 commits into
matplotlib:mainfrom
sahilmathur254:fix/32004-bug-set-prop-cycle-does-not-affect-c
Open

DOC: clarify source of Cn colors#32049
sahilmathur254 wants to merge 2 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

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
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.

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

2 participants