@@ -389,7 +389,7 @@ def __init__(self, fig, rect,
389389 def get_window_extent (self , * args , ** kwargs ):
390390 'get the axes bounding box in display space'
391391 return self .bbox
392-
392+
393393 def _init_axis (self ):
394394 "move this out of __init__ because non-separable axes don't use it"
395395 self .xaxis = XAxis (self )
@@ -1217,7 +1217,7 @@ def set_xlim(self, xmin=None, xmax=None, emit=False):
12171217 ACCEPTS: len(2) sequence of floats
12181218 """
12191219
1220- if xmax is None and hasattr (xmin , '__len__' ):
1220+ if xmax is None and iterable (xmin ):
12211221 xmin ,xmax = xmin
12221222
12231223 old_xmin ,old_xmax = self .get_xlim ()
@@ -1330,7 +1330,7 @@ def set_ylim(self, ymin=None, ymax=None, emit=False):
13301330 ACCEPTS: len(2) sequence of floats
13311331 """
13321332
1333- if ymax is None and hasattr (ymin , '__len__' ):
1333+ if ymax is None and iterable (ymin ):
13341334 ymin ,ymax = ymin
13351335
13361336 old_ymin ,old_ymax = self .get_ylim ()
@@ -1797,7 +1797,7 @@ def annotate(self, *args, **kwargs):
17971797 self ._set_artist_props (a )
17981798 self .texts .append (a )
17991799 return a
1800-
1800+
18011801
18021802 #### Lines and spans
18031803
@@ -2508,7 +2508,7 @@ def make_iterable(x):
25082508
25092509 if yerr is not None :
25102510 if not iterable (yerr ):
2511- yerr = asarray ([yerr ]* nbars , Float )
2511+ yerr = asarray ([yerr ]* nbars , Float )
25122512 else :
25132513 yerr = asarray (yerr )
25142514 if xerr is not None :
@@ -2641,7 +2641,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
26412641
26422642 xranges : sequence of (xmin, xwidth)
26432643 yrange : (ymin, ywidth)
2644-
2644+
26452645 optional kwargs:
26462646 edgecolors
26472647 facecolors
@@ -2659,7 +2659,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
26592659
26602660 return col
26612661
2662-
2662+
26632663 def stem (self , x , y , linefmt = 'b-' , markerfmt = 'bo' , basefmt = 'r-' ):
26642664 """
26652665 STEM(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
@@ -3222,44 +3222,44 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
32223222
32233223 sym = None
32243224 starlike = False
3225-
3225+
32263226 # to be API compatible
32273227 if marker is None and not (verts is None ):
32283228 marker = (verts , 0 )
32293229 verts = None
3230-
3230+
32313231 if is_string_like (marker ):
32323232 # the standard way to define symbols using a string character
32333233 sym = syms .get (marker )
32343234 if sym is None and verts is None :
32353235 raise ValueError ('Unknown marker symbol to scatter' )
32363236 numsides , rotation = syms [marker ]
3237-
3237+
32383238 elif iterable (marker ):
32393239 # accept marker to be:
32403240 # (numsides, style, [angle])
32413241 # or
32423242 # (verts[], style, [angle])
3243-
3243+
32443244 if len (marker )< 2 or len (marker )> 3 :
32453245 raise ValueError ('Cannot create markersymbol from marker' )
3246-
3246+
32473247 if is_numlike (marker [0 ]):
32483248 # (numsides, style, [angle])
3249-
3249+
32503250 if len (marker )== 2 :
32513251 numsides , rotation = marker [0 ], math .pi / 4.
32523252 elif len (marker )== 3 :
32533253 numsides , rotation = marker [0 ], marker [2 ]
32543254 sym = True
3255-
3255+
32563256 if marker [1 ]== 1 :
32573257 # starlike symbol, everthing else is interpreted as solid symbol
32583258 starlike = True
3259-
3259+
32603260 else :
32613261 verts = asarray (marker [0 ])
3262-
3262+
32633263 if sym is not None :
32643264 if not starlike :
32653265 collection = RegularPolyCollection (
@@ -3285,7 +3285,7 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
32853285 # rescale verts
32863286 rescale = sqrt (max (verts [:,0 ]** 2 + verts [:,1 ]** 2 ))
32873287 verts /= rescale
3288-
3288+
32893289 scales = asarray (scales )
32903290 scales = sqrt (scales * self .figure .dpi .get () / 72. )
32913291 if len (scales )== 1 :
@@ -4832,7 +4832,7 @@ def draw(self, renderer):
48324832 artists .extend (self .texts )
48334833 artists .extend (self .collections )
48344834 artists .extend (self .patches )
4835- artists .extend (self .artists )
4835+ artists .extend (self .artists )
48364836 dsu = [ (a .zorder , a ) for a in artists ]
48374837 dsu .sort ()
48384838
0 commit comments