Skip to content

Improve categorical example #15123

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

Conversation

timhoffm
Copy link
Member

PR Summary

This is a purely aesthetic change. The fruit names were a bit long so that they overlap in the bar plot: https://matplotlib.org/devdocs/gallery/lines_bars_and_markers/categorical_variables.html#sphx-glr-gallery-lines-bars-and-markers-categorical-variables-py.

While there are many ways to clean that up, I did not want to introduce additional parameters or commands to keep the example code as simple as possible. So just switching to shorter food names (and making it more pythonesque).

@ImportanceOfBeingErnest
Copy link
Member

It is well known that noone likes ham, eggs and spam. So alternatively one could use constrained_layout=True. This would let the tasty fruits survive.

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a kosher keeper, kinda prefer food I can eat 😜 on a slightly more serious note, what about just putting the fruits in the singular?

@timhoffm
Copy link
Member Author

Going with the singular fruits. 😄

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's with all these other changes though?

@timhoffm timhoffm force-pushed the categorical-example branch from c72889f to 1bb9338 Compare August 26, 2019 22:04
@timhoffm
Copy link
Member Author

Whoops. Messed up the commits. Fixed.

@ImportanceOfBeingErnest ImportanceOfBeingErnest added this to the v3.2.0 milestone Aug 27, 2019
@ImportanceOfBeingErnest ImportanceOfBeingErnest merged commit 00912ad into matplotlib:master Aug 27, 2019
@timhoffm timhoffm deleted the categorical-example branch July 19, 2024 11:36
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.

3 participants