Skip to content

[Bug]: ".C10" does not work as plot shorthand format spec #27828

Closed
@anntzer

Description

@anntzer

Bug summary

The plot shorthand format spec does not work when combining a Cn color with n>=10 with a linestyle or a markerstyle, e.g. ".C10". Somewhat inconsistently, it does work when a Cn color is given by itself.

Code for reproduction

from pylab import *; plot([0, 1], ".C10") 
# plot([0, 1], "C10") works; note that this also goes through the shorthand route
# unlike plot([0, 1], c="C10")

Actual outcome

ValueError: '.C10' is not a valid format string (unrecognized character '0')

Expected outcome

No error.

Additional information

No response

Operating system

macos

Matplotlib Version

3.9.0.dev1178+g88d64e5f0c

Matplotlib Backend

any

Python version

3.12

Jupyter version

none

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions