Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Found in the context ofastropy/astropy#6786
When hist() is passed irregular bins withnormed=True
, the output is different between matplotlib 2.0 and 2.1. Here is a test script to reproduce the issue:
# Python 3.6importmatplotlib.pyplotaspltimportmatplotlibimportnumpyasnprng=np.random.RandomState(829)t=np.concatenate([rng.randn(100),2+0.1*rng.randn(100),5+3*rng.randn(100)])plt.hist(t,bins=[-5,-3,-2,-1,-0.5,0,2,4,5,10],normed=True)plt.title(f'matplotlib v{matplotlib.__version__}')plt.savefig(f'hist-{matplotlib.__version__}.png')plt.show()