Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Closed
Labels
Milestone
Description
Problem
It would be nice to specify the color of a set of violin plots in the constructor, rather than doing it afterwards for each component of the violinplot. This is usually how colors are set in matplotlib, so it would be in keeping with the general schema of matplotlib.
I can set this up as a PR if people think it's useful and makes sense for the library.
Proposed solution
The current color selection is donehere. It looks like this:
# Colors.ifmpl.rcParams['_internal.classic_mode']:fillcolor='y'linecolor='r'else:fillcolor=linecolor=self._get_lines.get_next_color()
The proposed enhancement would look something like this, wherecolor is a new key word argument with default value=None.
# Colors.ifmpl.rcParams['_internal.classic_mode']:fillcolor='y'linecolor='r'elifcolorisnotNone:fillcolor=linecolor=colorelse:fillcolor=linecolor=self._get_lines.get_next_color()
This could even work for a sequence of colors, but a little bit more code would have to be changed.