You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To replicate:
pylab.hist([linspace(0,10,100),linspace(20,30,100)])
This will produce a figure exactly identical to
pylab.hist(linspace(0,10,100)).
But the expected behavior should is closer to
pylab.hist(linspace(0,10,100))
pylab.hist(linspace(20,30,100))
The simplest fix would be to make it so the default range gets set to the min and max across all series. (0,30) in my example
Something better could probably be done so that each series gets distributed across the same number of bins.
The result of pylab.hist([linspace(0,10,100),linspace(20,30,100)]) is a histogram with 10 bars in the range (0, 30), where the histograms leave space to represent two datasets side by side.
The result of pylab.hist(linspace(0,10,100)) is a histogram with 10 bars in the range (0, 10).
The result of pylab.hist(linspace(0,10,100)); pylab.hist(linspace(20,30,100)) is a histogram with 10 bars between (0, 10) and 10 bars between (20, 30) without side-by-side space for dataset comparison.
Activity
pelson commentedon Jun 17, 2012
I don't think this is the case any more.
The result of
pylab.hist([linspace(0,10,100),linspace(20,30,100)])is a histogram with 10 bars in the range (0, 30), where the histograms leave space to represent two datasets side by side.The result of
pylab.hist(linspace(0,10,100))is a histogram with 10 bars in the range (0, 10).The result of
pylab.hist(linspace(0,10,100)); pylab.hist(linspace(20,30,100))is a histogram with 10 bars between (0, 10) and 10 bars between (20, 30) without side-by-side space for dataset comparison.