Skip to content

[Bug]: set_prop_cycle does not affect Cn colors #32004

Description

@aschankler

Bug summary

Updating the color cycler with set_prop_cycle does not affect the colors selected explicitly with the "Cn" notation.

Code for reproduction

fig, ax = plt.subplots()

ax.set_prop_cycle(color=["k"])
# Expect this line to be black; it is drawn blue
ax.plot([0, 1], [0, 1], color="C0")

Actual outcome

Colors are selected based on the global cycler.

Expected outcome

Expect colors to be selected according to the updated cycler.

Additional information

Occurs on windows + mpl 3.11.0 and linux + mpl 3.10.0

Operating system

Windows and linux (RHEL9)

Matplotlib Version

3.11.0

Matplotlib Backend

No response

Python version

3.12.13

Jupyter version

No response

Installation

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions