Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,8 @@ def set_dashes(self, dash_offset, dash_list):
dash_offset : float
The offset (usually 0).
dash_list : array-like or None
The on-off sequence as points. None specifies a solid line.
The on-off sequence as points. None specifies a solid line. All
values must otherwise be non-negative (:math:`\\ge 0`).

Notes
-----
Expand All @@ -924,7 +925,10 @@ def set_dashes(self, dash_offset, dash_list):
dl = np.asarray(dash_list)
if np.any(dl < 0.0):
raise ValueError(
"All values in the dash list must be positive")
"All values in the dash list must be non-negative")
if not np.any(dl > 0.0):
raise ValueError(
'At least one value in the dash list must be positive')
self._dashes = dash_offset, dash_list

def set_foreground(self, fg, isRGBA=False):
Expand Down