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

Axhline doesn’t cycle through colors #16714

Closed
@01baftb

Description

@01baftb

As requested by@story645, I am posting a possible bug I reported in the forumhttps://discourse.matplotlib.org/t/axhline-doesnt-cycle-through-colors/20938

When I plot horizontal lines usingaxhline, there resulting lines are all the same color. It doesn’t cycle automatically. Is this behavior expected? Do I need to manually setup the color cycling? If so how can I do this easily? Why does matplotlib not automatically cycle through the colors foraxhline?

matplotlib v3.2.0

%matplotlib widgetimport matplotlib.pyplot as pltfig, ax = plt.subplots()count = 5for n in range(count):    ax.axhline(y=n**2, label=n)     ax.legend()plt.show()

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp