-
-
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
Bug report
Bug summary
Setting a logarithmic y-axis with ax.set_yscale('log')
causes histograms to disappear from the axis. This occurs in 2.1.0 but not in 2.0.2.
Code for reproduction
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
xs = 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
With 2.1.0:
Expected outcome
I expect to see a logarithm y-axis and the histogram, but I only see the former. With 2.0.2 I see this:
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.