Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67d2324

Browse files
committed
Make histogram example figures fit on web page
1 parent f0ccf7e commit 67d2324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/statistics/hist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
# edit the histogram to our liking. Let's change the color of each bar
4747
# based on its y value.
4848

49-
fig, axs = plt.subplots(1, 2, figsize=(10, 5), tight_layout=True)
49+
fig, axs = plt.subplots(1, 2, tight_layout=True)
5050

5151
# N is the count in each bin, bins is the lower-limit of the bin
5252
N, bins, patches = axs[0].hist(x, bins=n_bins)
@@ -87,7 +87,7 @@
8787
# Customizing a 2D histogram is similar to the 1D case, you can control
8888
# visual components such as the bin size or color normalization.
8989

90-
fig, axs = plt.subplots(1, 3, figsize=(15, 5), sharex=True, sharey=True,
90+
fig, axs = plt.subplots(3, 1, figsize=(5, 15), sharex=True, sharey=True,
9191
tight_layout=True)
9292

9393
# We can increase the number of bins on each axis

0 commit comments

Comments
 (0)