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
[Bug]: stacked histogram does not properly handle edgecolor and hatches #26718
Comments
Didn't have the chance to test on Python 3.10.0 and mpl 3.7.2 yet. But running first block of the code above with mpl 3.9.0 dev and Python 3.11.5 (conda) on Mac will give:
|
Hi, I'm working in this issue if @stevezhang1999 is not . Right now 'color' is a parameter in hist function, but edgecolor/hatch isn't. The function that deals with this 2 other parameters is in artist.py, and accepts types 'color' or 'none'. I was thinking about adding these parameters in hist function, but that means we would have to change documentation. If someone have a better approach pls tell me |
You are welcomed to work on it if that interests you! |
hey guys, in developer mode |
There is no reason for plt.show to not work in developer mode. Check your installation |
Bug summary
When using stacked histogram in matplotlib 3.7.2 the functionality of hatch and edgecolor is broken. It simply gives an error if trying to define either a separate edgecolor or hatch value for the stacked parts of the histogram.
Code for reproduction
Actual outcome
While using different edgecolors for the stacked part with
delivers the error
It seems to interpret the list of
edgecolor
["C2", "C3"] as one color, although it is able to manage similar input forcolor
.Expected outcome
It should look similar to the following example, except that the top orange part should have dots and not slanted lines:
The code used to generate this plot:
In case of the second example it should habe two different edgecolors for the first and second part of the stacked histogram.
Additional information
No response
Operating system
MacOSX
Matplotlib Version
3.7.2
Matplotlib Backend
MacOSX
Python version
3.10.0
Jupyter version
No response
Installation
conda
The text was updated successfully, but these errors were encountered: