Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from May 14, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/matplotlib/backend_bases.py
Expand Up @@ -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):
Expand Down