Skip to content

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