Closed
Description
I think there is a bug in Axes.hist
for the specific combination of log=True, histtype='step{filled}', weights=[something small]
, where the y-minimum is set to 1/base despite the possibility of weights << 1. Please see the following example:
from numpy import (ones_like, random)
from matplotlib import pyplot
data = random.normal(size=10000)
fig = pyplot.figure()
ax = fig.gca()
ax.hist(data, log=True, histtype='step', weights=ones_like(data) * 1e-5)
fig.show()
with log=False
, the figure looks normal, while with log=True
the patch minimum is set to 0.1
(> 1e-5) meaning the patches are all 1-D lines at 0.1.
I believe this patch should fix the problem.
Metadata
Metadata
Assignees
Labels
No labels