-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
Description
Found in the context of astropy/astropy#6786
When hist() is passed irregular bins with normed=True
, the output is different between matplotlib 2.0 and 2.1. Here is a test script to reproduce the issue:
# Python 3.6
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
rng = 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()
Metadata
Metadata
Assignees
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.