8000 Fix limits in plot types example hist(x) · matplotlib/matplotlib@7daa791 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7daa791

Browse files
committed
Fix limits in plot types example hist(x)
hist(x) has a natural y-scale due to the counts. We don't want to rescale that manually or reduce the sample size (which would make the distribution not look so nice). So instead we scale up the axis limits.
1 parent 831a13c commit 7daa791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plot_types/stats/hist_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
ax.hist(x, bins=8, linewidth=0.5, edgecolor="white")
2121

2222
ax.set(xlim=(0, 8), xticks=np.arange(1, 8),
23-
ylim=(0, 8), yticks=np.arange(1, 8))
23+
ylim=(0, 56), yticks=np.linspace(0, 56, 9))
2424

2525
plt.show()

0 commit comments

Comments
 (0)
0