Skip to content

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

Merged
merged 1 commit into from
Jun 9, 2017

Conversation

dstansby
Copy link
Member

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.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone May 12, 2017
@@ -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)
Copy link
Member

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.

Copy link
Member Author

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'.

Copy link
Member

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.)

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Contributor

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 :-)

@tacaswell tacaswell merged commit 622307f into matplotlib:master Jun 9, 2017
@dstansby dstansby deleted the hist-example branch June 24, 2017 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants