Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
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
Labels
No labels