-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Clarify handling of #rrggbb(aa) colors in matplotlibrc. #22565
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
Conversation
lib/matplotlib/rcsetup.py
Outdated
stmp = '#' + s | ||
if is_color_like(stmp): | ||
return stmp | ||
# Support "rrggbb"/"rggbbaa" without leading '#' because these would be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rggbbaa -> rrggbbaa
it's just in comments, but...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for noting that, fixed.
The inconsistency is not that great, but let's at least document it.
We should consider whether this is the direction we want to go. Right now, the functionality is there, but likely almost nobody uses it because it's not documented. By documenting we encourage adoption. I'd rather not do that. Instead we should follow up on #19954, so that we can do |
No strong opinion there (other than my oft-stated opinion about the matplotlibrc syntax in general). |
This enables using the comment character # within strings. Closes matplotlib#19288. Superseeds matplotlib#22565.
This enables using the comment character # within strings. Closes matplotlib#19288. Superseeds matplotlib#22565.
This enables using the comment character # within strings. Closes matplotlib#19288. Superseeds matplotlib#22565.
Superseeded by #22589. |
The inconsistency is not that great, but let's at least document it.
See https://discourse.matplotlib.org/t/specifying-hex-colors-in-style-sheets/22624.
PR Summary
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).