Skip to content

Setting dashes to (0,0) results in infinite loop for agg backends #1999

Merged
merged 1 commit into from May 14, 2013
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):
Something went wrong with that request. Please try again.