Skip to content

Commit ec4f168

Browse files
committed
MNT: deal with (0, 0) dashes.
1 parent c18140c commit ec4f168

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/lines.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def _get_dash_pattern(style):
5858

5959
# normalize offset to be positive and shorter than the dash cycle
6060
if dashes is not None and offset is not None:
61-
offset %= sum(dashes)
61+
dsum = sum(dashes)
62+
if dsum:
63+
offset %= dsum
6264

6365
return offset, dashes
6466

0 commit comments

Comments
 (0)