Skip to content

Added Documentation on customizing color Sequences in Matplotlib #29554

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SHRISHTISHUKLA-0
Copy link

PR adds missing documentation on color sequences in matplotlib , its make it easy for user as per my view to understand and apply them in their plots. currently as per my view matplotlib documentation lacks a dedicated section to explain how to use color sequences
.here solved problem
provide and also show how to define custom color sequences using cycler module and to apply color module in stylesheet I think through mplstyle files for styling.
mainly reason for this implementation as per me matplotlib provide the beginner-friendly documentation most importantly I will help user for leverage matplotlib styling
closes#28750
here documentation includes an explanation of color sequences and role
also demonstrate custom color cycles and style sheet
and I readed & made content follows matplotlibs documentation and there guidelines
hope so it will help to solve the issue if still there is something missing let me know.

thank you)

@github-actions github-actions bot added the Documentation: user guide files in galleries/users_explain or doc/users label Jan 31, 2025
@WeatherGod
Copy link
Member

Looks like the text was added to the wrong file? It also looks like a "submodule" was accidentally added?

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Thanks for the potential contribution

This material can almost certainly not go on the main index page. There is already an entry for this in the Users Guide: https://matplotlib.org/stable/users/explain/artists/color_cycle.html Perhaps you would consider editing that in place, or finding a more suitable place for this.

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.

Thanks for the PR but besides the issues of location, these docs don't show the use of the color sequence registry and that is the issue that this new doc is intended to address.

@rcomer
Copy link
Member

rcomer commented Jan 31, 2025

My reading of #28750 is that this should be about using color_sequences, which do not seem to be mentioned here.

@SHRISHTISHUKLA-0 if you are using AI to generate your changes, please read
https://matplotlib.org/devdocs/devel/contribute.html#restrictions-on-generative-ai-usage

@SHRISHTISHUKLA-0
Copy link
Author

Looks like the text was added to the wrong file? It also looks like a "submodule" was accidentally added?

text I have added in index.rst
but I faced issue when I was running make html?

@SHRISHTISHUKLA-0
Copy link
Author

My reading of #28750 is that this should be about using color_sequences, which do not seem to be mentioned here.

@SHRISHTISHUKLA-0 if you are using AI to generate your changes, please read https://matplotlib.org/devdocs/devel/contribute.html#restrictions-on-generative-ai-usage

as a example I linked this caused while running( make html )in terminal I got error

@jklymak
Copy link
Member

jklymak commented Jan 31, 2025

If you are just trying to use our CI, please mark the PR as "Draft". I'm moving it to Draft now.

@jklymak jklymak marked this pull request as draft January 31, 2025 17:59
@SHRISHTISHUKLA-0
Copy link
Author

Thanks for the potential contribution

This material can almost certainly not go on the main index page. There is already an entry for this in the Users Guide: https://matplotlib.org/stable/users/explain/artists/color_cycle.html Perhaps you would consider editing that in place, or finding a more suitable place for this.

Thank you for the feedback!
I appreciate the clarification regarding the placement of this content. Since there is already an entry in the User Artists Tutorial-color cycles , I’d be happy to enhance that section instead of adding a separate page.
To improve the existing documentation I can:
Expand explanations on what color sequences are and why they are useful.
Add clearer examples to demonstrate how to customize color cycles effectively.
Provide guidance on using color sequences in style sheets for accessibility and consistency.
Would these improvements align with Matplotlib’s documentation goals? Let me know if there are specific areas you'd like me to refine further. Looking forward to your guidance!

@SHRISHTISHUKLA-0
Copy link
Author

Thanks for the PR but besides the issues of location, these docs don't show the use of the color sequence registry and that is the issue that this new doc is intended to address.

Thank you for the clarification here
now understand that the goal of this documentation update is to showcase the color sequence registry rather than just general color cycle customization. Since my initial contribution in #28750 focused on explaining what color sequences are, how to customize them, and how to use different stylesheets for accessibility, I can refine it further to emphasize the color sequence registry specifically.
To improve this, I propose:
Adding an example that demonstrates how to use the color sequence registry effectively and
Highlighting the benefits of the registry over manually defining color cycles.
Adjusting the structure so that it directly addresses the intended purpose of this new doc.
please would this approach align with the documentation goals? I’d be happy to modify the PR accordingly!

@SHRISHTISHUKLA-0
Copy link
Author

If you are just trying to use our CI, please mark the PR as "Draft". I'm moving it to Draft now.

Thanks for updating the PR status. My goal is to contribute meaningfully to the documentation rather than just using the CI. I appreciate the feedback and will refine my changes to better align with the documentation goals, particularly focusing on the color sequence registry as suggested.
would you please recommend any specific improvements to ensure the PR is in the right direction before marking it as ready for review again?

@story645
Copy link
Member

Adding an example that demonstrates how to use the color sequence registry effectively and

Yes, the PR will not even be considered for merging without this example

Highlighting the benefits of the registry over manually defining color cycles.

They serve different purposes and this PR should describe each one separately.

But like @rcomer said, please explain what these are to show that you understand these concepts.

@SHRISHTISHUKLA-0
Copy link
Author

My reading of #28750 is that this should be about using color_sequences, which do not seem to be mentioned here.

@SHRISHTISHUKLA-0 if you are using AI to generate your changes, please read https://matplotlib.org/devdocs/devel/contribute.html#restrictions-on-generative-ai-usage

btw Thank you for the feedback! I understand that this documentation should focus on using color_sequences. I will review the existing documentation and make the necessary adjustments to ensure it properly covers color_sequences and
Also, I want to clarify that I have not used AI to generate this content—I have written and structured it based on my understanding of Matplotlib’s documentation and guidelines. I will go through the contribution guidelines again to ensure my PR aligns with the project’s expectations it would very helpful for me if you
Would suggest a specific section where you think color_sequences should be highlighted, or should I update the relevant Users Guide entry directly?

@story645
Copy link
Member

I have written and structured it based on my understanding of Matplotlib’s documentation and guidelines

The content of this PR does not show that you understand color sequences because it at no point specifically talks about what the color sequences are, nor how to create or use them.

Instead, these docs read like a generic mashup of existing documentation on color cyclers, which is why it reads like AI wrote it to @rcomer and me.

should I update the relevant Users Guide entry directly

The document @jklymak linked seems fine as a start.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants