Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[ENH]: Add color argument to violinplot constructor #27298

Closed
Milestone
@landoskape

Description

@landoskape

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp