8000 [ENH]: set default color cycle to named color sequence · Issue #29799 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[ENH]: set default color cycle to named color sequence #29799
Closed
@rcomer

Description

@rcomer

Problem

It would be great if I could put something like this in my matplotlibrc to use the petroff10 color sequence by default:

axes.prop_cycle : cycler('color', 'petroff10')

Proposed solution

Currently if a single string is supplied we try to interpret as a list of single character colors

if allow_stringlist:
# Sometimes, a list of colors might be a single string
# of single-letter colornames. So give that a shot.
val = [scalar_validator(v.strip()) for v in s if v.strip()]

None of the current built in color sequences can be interpreted that way, so it would not be ambiguous to try both that and querying the color sequence registry. However, maybe we would need something to guard against user- or third-party-defined color sequences having a name like "rygbk"?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects
    2F10

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0