-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Handle single color for multiple datasets in hist
#30867
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
base: main
Are you sure you want to change the base?
Conversation
|
The code itself is fine. Please update the docstring and ad a release note. See https://matplotlib.org/devdocs/devel/api_changes.html#announce-new-and-deprecated-api. |
|
Done. @timhoffm |
timhoffm
left a comment
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.
Sorry, I forgot to mention: Could you please also add a test?
| Handle single color for multiple datasets in hist | ||
| ----------------- | ||
|
|
||
| It is now possible to use a single color with multiple datasets in ``hist``. | ||
| Up to now, the 'color' keyword argument required one color per dataset. | ||
| Using a single color with multiple datasets would previously lead to a ValueError. |
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.
| Handle single color for multiple datasets in hist | |
| ----------------- | |
| It is now possible to use a single color with multiple datasets in ``hist``. | |
| Up to now, the 'color' keyword argument required one color per dataset. | |
| Using a single color with multiple datasets would previously lead to a ValueError. | |
| ``hist()`` supports a single color for multiple datasets | |
| -------------------------------------------------------- | |
| It is now possible pass a single *color* value to `~.Axes.hist()`. This value | |
| is applied to all datasets. |
A bit more to the point.
PR summary
Close #30857 with minimal change
If a single valid color is provided, duplicate it to match the size of the dataset.
PR checklist