Permalink
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...
2 parents 2e7399e + b8a0dcf commit 616efcf66db4af17970d50a25dbbcb06fadbdb82 @mdboom mdboom committed May 14, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 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):

0 comments on commit 616efcf

Please sign in to comment.