@@ -18,7 +18,7 @@ class Spine(mpatches.Patch):
1818 positions. See function:`~matplotlib.spines.Spine.set_position`
1919 for more information.
2020
21- The default position is ``('outward',0)``.
21+ The default position is ``('outward', 0)``.
2222
2323 Spines are subclasses of class:`~matplotlib.patches.Patch`, and
2424 inherit much of their behavior.
@@ -379,28 +379,23 @@ def draw(self, renderer):
379379 return ret
380380
381381 def set_position (self , position ):
382- """Set the position of the spine.
382+ """
383+ Set the position of the spine.
383384
384385 Spine position is specified by a 2 tuple of (position type,
385386 amount). The position types are:
386387
387- * 'outward' : place the spine out from the data area by the
388- specified number of points. (Negative values specify placing the
389- spine inward.)
390-
391- * 'axes' : place the spine at the specified Axes coordinate (from
392- 0.0-1.0).
393-
394- * 'data' : place the spine at the specified data coordinate.
388+ * 'outward': place the spine out from the data area by the specified
389+ number of points. (Negative values place the spine inwards.)
390+ * 'axes': place the spine at the specified Axes coordinate (0 to 1).
391+ * 'data': place the spine at the specified data coordinate.
395392
396393 Additionally, shorthand notations define a special positions:
397394
398- * 'center' -> ('axes',0.5)
395+ * 'center' -> ('axes', 0.5)
399396 * 'zero' -> ('data', 0.0)
400-
401397 """
402- if position in ('center' , 'zero' ):
403- # special positions
398+ if position in ('center' , 'zero' ): # special positions
404399 pass
405400 else :
406401 if len (position ) != 2 :
@@ -409,9 +404,7 @@ def set_position(self, position):
409404 raise ValueError ("position[0] should be one of 'outward', "
410405 "'axes', or 'data' " )
411406 self ._position = position
412-
413407 self .set_transform (self .get_spine_transform ())
414-
415408 if self .axis is not None :
416409 self .axis .reset_ticks ()
417410 self .stale = True
0 commit comments