Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1999 from mdboom/dashes-infinite-loop

Setting dashes to (0,0) results in infinite loop for agg backends
  • Loading branch information...
commit 616efcf66db4af17970d50a25dbbcb06fadbdb82 2 parents 2e7399e + b8a0dcf
@mdboom mdboom authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/matplotlib/backend_bases.py
View
4 lib/matplotlib/backend_bases.py
@@ -872,6 +872,10 @@ def set_dashes(self, dash_offset, dash_list):
specifies the on-off sequence as points. ``(None, None)`` specifies a solid line
"""
+ if dash_list is not None:
+ dash_list = np.asarray(dash_list)
+ if np.any(dash_list <= 0.0):
+ raise ValueError("All values in the dash list must be positive")
self._dashes = dash_offset, dash_list
def set_foreground(self, fg, isRGB=False):
Please sign in to comment.
Something went wrong with that request. Please try again.