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

[Bug]: Line2D.set_linestyle treats dash pattern with None onoffseq as dashed #23437

Open
@mwaskom

Description

@mwaskom

Bug summary

The logic for setting linestyle using a dash tuple, i.e.(offset, onoffseq), does not properly handle the case whereonoffseq isNone.

Code for reproduction

print(mpl.lines.Line2D([], [],linestyle=(0,None)).get_linestyle())

Actual outcome

'--'

Expected outcome

Ideally, dash values would roundtrip, so the return would be(0, None). Even when the dash sequence is notNone, a lot of information is lost when this property is queried.

But more narrowly,(0, None) draws a solid line, so the return value should be'-'.

Additional information

The main consequence here is that the line's capstyle appears to conditionally read fromsolid_capstyle ordash_capstyle depending on theget_linestyle return value.

Matplotlib Version

3.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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