-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make histogram example figures fit on web page #8614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -46,7 +46,7 @@ | |||
# edit the histogram to our liking. Let's change the color of each bar | |||
# based on its y value. | |||
|
|||
fig, axs = plt.subplots(1, 2, figsize=(10, 5), tight_layout=True) | |||
fig, axs = plt.subplots(1, 2, tight_layout=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This loses the "squareness" of the Axes, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that matter? The first figure above isn't 'square'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed it was somewhat intentional in this one (since the first figure wasn't square.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any particular reason - removing the figsize makes the two images match and fit on the webpage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinging @choldgraf who (IIRC) recently modified the example: was the “squareness” intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was intentional just from an aesthetic standpoint, but I'm gonna chock this up to my OCD and say I'm +1 on changing it back since it looks dumb hanging off the side of the page like that :-)
Currently a couple of the histogram examples are flowing off the side of the webpage; http://matplotlib.org/devdocs/gallery/statistics/hist.html#sphx-glr-gallery-statistics-hist-py
This just changes their size so they fit on the webpage vertically.