Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 622307f

Browse filesBrowse files
authored
Merge pull request #8614 from dstansby/hist-example
DOC: Make histogram example figures fit on web page
2 parents 34fda3e + 67d2324 commit 622307f
Copy full SHA for 622307f

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎examples/statistics/hist.py

Copy file name to clipboardExpand all lines: examples/statistics/hist.py
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.