I am trying to use stacked and normed at the same time. I have thought about it - and I think it does make sense for what I want to do.
Below is some code and a figure that demonstrate the problem. There are two histograms. Both use teh same data. Both are stacked. The top histogram uses normed=False. The bottom uses normed =True. Ideally, the histograms would be identical except for scaling on the y-axis. The histogram with normed=False looks OK. The left-half of the normed=True histogram looks OK. About half-way through the second distribution moves from the top of the bars to the bottom. At least that's the way it looks from eyeballing. Does anybody have a suggestion about how to get around this problem? Should I be reporting a bug somewhere? Thanks, Wayne Hajas ================== from numpy.random import normal,seed import matplotlib.pyplot as plt seed(100) x=normal(loc=0,scale=1,size=1000) y=normal(loc=1,scale=1,size=1000) bins=map(lambda i:-2.+5.*float(i)/float(50),range(51)) plt.close() plt.subplot(211) plt.hist([x,y],bins=bins,alpha=0.5, stacked=True,normed=False) plt.subplot(212) plt.hist([x,y],bins=bins,alpha=0.5, stacked=True,normed=True) plt.show() <http://matplotlib.1069221.n5.nabble.com/file/n40552/StackedProblem.png> -- View this message in context: http://matplotlib.1069221.n5.nabble.com/conflict-between-stacked-and-normed-in-hist-tp40552.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users