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
Bug report
Bug summary
Setting a logarithmic y-axis withax.set_yscale('log')
causes histograms to disappear from the axis. This occurs in2.1.0 but not in 2.0.2.
Code for reproduction
importmatplotlibmatplotlib.use('Agg')importmatplotlib.pyplotaspltimportnumpyasnpxs=np.random.normal(size=int(1e6))fig, (ax1,ax2)=plt.subplots(1,2)ax1.hist(xs,range=(-5,5),bins=100)ax2.hist(xs,range=(-5,5),bins=100)ax2.set_ylim(ymin=1)ax2.set_yscale('log')fig.savefig('histogram.png')
Actual outcome
With2.1.0:
Expected outcome
I expect to see a logarithm y-axisand the histogram, but I only see the former. With2.0.2 I see this: