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
matplotlib-1.2.0: regression in histogram with barstacked drawing? #1679
Comments
git bisect tells me the culprit is 7ba1743, but not sure exactly what the fix is yet. |
I suspect you're correct. I'll take a look at it this weekend |
Alright, I think I remember now what I did. Since the stacked histogram is done by putting later histograms over the top of previous one, the upper-most one needed to be plotted first. This approach of layering the patches seems to be causing other problems as well (#1631), so I may need to revisit how this is implemented. I seem to remember having problems with it when using fill_between, as suggested there. I'll take another stab at it and if I get stuck I'll submit the PR so others can take a look. |
@neggert I think histograms can take a |
Scratch that. I think I was thinking of |
Closing since the relevant pull requests have been merged. Thanks! |
To: Matplotlib-users@lists.sourceforge.net
Message-ID: 50DF638E.80904@fold.natur.cuni.cz
Hi,
I recently updated to matplotlib-1.2.0 from 1.1.1 and my figures have rotated
order of color bars stacked upon each other. Here is a small testcase I sketched
now and two generated png files are attached, generated by the two different
matplotlib versions. The colornames are just bad in the legend, just to show that
the order of input data is same in both cases.
I would be grateful for any comments on this.
Thank you,
Martin
! /usr/bin/python
import pylab
F = pylab.gcf()
F.set_size_inches(11.2, 8.4)
_e = [[100, 100, 100, 100, 200, 320, 450, 80, 20, 600, 310, 800], [20, 23, 50, 11, 100, 420], [120, 120, 120, 140, 140, 150, 180], [60, 60, 60, 60, 300, 300, 5, 5, 5, 5, 10, 300], [555, 555, 555, 30, 30, 30, 30, 30, 100, 100, 100, 100, 30, 30], [30, 30, 30, 30, 400, 400, 400, 400, 400, 400, 400, 400]]
_ee = [(0.5759849696758961, 1.0, 0.0), (0.0, 1.0, 0.350624650815206), (0.0, 1.0, 0.6549834156005998), (0.0, 0.6569064625276622, 1.0), (0.28302699607823545, 0.0, 1.0), (0.6849123462299822, 0.0, 1.0)]
_eee = ['green', 'orange', ' yellow', 'magenta', 'black']
pylab.hist(_e, bins=10, histtype='barstacked', align='mid', color=_ee, log=False, label=_eee)
pylab.legend(loc='upper right', bbox_to_anchor = (1.0, 1.0), ncol=1)
F.savefig("hist_barstacked_bug.png", dpi=100)
The text was updated successfully, but these errors were encountered: