Skip to content

Simplify example: Box plots with custom fill colors #27781

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 2 commits into from
Feb 13, 2024

Conversation

timhoffm
Copy link
Member

The original example was more complex than need be:

  • The two plots only differed in the notch=True parameter, which is irrelevant for custom fill colors -> reduce to one
  • rework to a more realistic-like plot

The [original example](https://matplotlib.org/3.8
.0/gallery/statistics/boxplot_color.html) was more complex than need be:

- The two plots only differed in the `notch=True` parameter,
  which is irrelevant for custom fill colors
  -> reduce to one
- rework to a more realistic-like plot
@timhoffm timhoffm added the Documentation: examples files in galleries/examples label Feb 13, 2024
@timhoffm timhoffm added this to the v3.9.0 milestone Feb 13, 2024
Copy link
Member

@rcomer rcomer left a comment

Choose a reason for hiding this comment

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

One small typo but otherwise looks good to me.

np.random.normal(120, 30, size=100),
]
labels = ['peaches', 'oranges', 'tomatos']
colors = ['peachpuff', 'orange', 'tomato']
Copy link
Member

Choose a reason for hiding this comment

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

I did not know these colours existed by using them here is 😎

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I checked https://matplotlib.org/devdocs/gallery/color/named_colors.html and chose the fruits after available color names 😎

Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
@timhoffm timhoffm merged commit 1defb57 into matplotlib:main Feb 13, 2024
@timhoffm timhoffm deleted the simplify-boxplot-color branch February 13, 2024 12:40
Impaler343 pushed a commit to Impaler343/matplotlib that referenced this pull request Mar 8, 2024
Simplify example: Box plots with custom fill colors

The [original example](https://matplotlib.org/3.8
.0/gallery/statistics/boxplot_color.html) was more complex than need be:

- The two plots only differed in the `notch=True` parameter,
  which is irrelevant for custom fill colors
  -> reduce to one
- rework to a more realistic-like plot

---------

Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: examples files in galleries/examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants