Permalink
Browse files

Make `offset_line` raise error if yerr is nonsense

  • Loading branch information...
dmcdougall committed Jul 14, 2012
1 parent 7e2cb48 commit e11e927292e06bce37644bde45136f8b2c78758a
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/matplotlib/mlab.py
View
@@ -3200,4 +3200,6 @@ def offset_line(y, yerr):
ymax = y + yerr
elif len(yerr) == 2:
ymin, ymax = y - yerr[0], y + yerr[1]
+ else:
+ raise ValueError("yerr must be scalar, 1xN or 2xN")
return ymin, ymax

0 comments on commit e11e927

Please sign in to comment.