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

Temporary styling ignores color cycle #11376

Closed
@rjurga

Description

@rjurga

Bug report

Bug summary

With temporary styling, using colors with respect to the color cycle, like'C0', is ignored ifplt.show() is called outside of thewith block. It only works properly ifplt.show() is called inside the block.

Code for reproduction

This reproduces the bug:

importmatplotlib.pyplotaspltwithplt.style.context('seaborn'):plt.axhline(0,color='C0')plt.axhline(1,color='C1')plt.axhline(2,color='C2')plt.show()

This works fine and is the expected behavior:

importmatplotlib.pyplotaspltwithplt.style.context('seaborn'):plt.axhline(0,color='C0')plt.axhline(1,color='C1')plt.axhline(2,color='C2')plt.show()

Actual outcome

does_not_work

Please note that other elements of the style are working fine, such as the grid.

Expected outcome

works

Matplotlib version

  • Operating system: Solus Linux
  • Matplotlib version: 2.2.2
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: 3.6.5

Using matplotlib packaged by the linux distribution.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp