@@ -26,8 +26,8 @@ def __init__(self, offset=(0., 0.)):
2626        """ 
2727        Parameters 
2828        ---------- 
29-         offset : pair of floats  
30-             The offset to apply to the path, measured in points. 
29+         offset : (float, float), default: (0, 0)  
30+             The (x, y)  offset to apply to the path, measured in points. 
3131        """ 
3232        self ._offset  =  offset 
3333
@@ -38,10 +38,10 @@ def _offset_transform(self, renderer):
3838
3939    def  _update_gc (self , gc , new_gc_dict ):
4040        """ 
41-         Update the given GraphicsCollection with the given 
42-         dictionary of properties. The keys in the dictionary are used to 
43-         identify the appropriate set_ method on the gc. 
41+         Update the given GraphicsContext with the given dict of properties. 
4442
43+         The keys in the dictionary are used to identify the appropriate 
44+         ``set_`` method on the *gc*. 
4545        """ 
4646        new_gc_dict  =  new_gc_dict .copy ()
4747
@@ -61,7 +61,6 @@ def draw_path(self, renderer, gc, tpath, affine, rgbFace=None):
6161        Derived should override this method. The arguments are the same 
6262        as :meth:`matplotlib.backend_bases.RendererBase.draw_path` 
6363        except the first argument is a renderer. 
64- 
6564        """ 
6665        # Get the real renderer, not a PathEffectRenderer. 
6766        if  isinstance (renderer , PathEffectRenderer ):
@@ -227,8 +226,8 @@ def __init__(self, offset=(2, -2),
227226        """ 
228227        Parameters 
229228        ---------- 
230-         offset : pair of floats  
231-             The offset of the shadow in points. 
229+         offset : (float, float), default: (2, -2)  
230+             The (x, y)  offset of the shadow in points. 
232231        shadow_rgbFace : color 
233232            The shadow color. 
234233        alpha : float, default: 0.3 
@@ -295,8 +294,8 @@ def __init__(self, offset=(2, -2),
295294        """ 
296295        Parameters 
297296        ---------- 
298-         offset : pair of floats  
299-             The offset to apply to the path, in points. 
297+         offset : (float, float), default: (2, -2)  
298+             The (x, y)  offset to apply to the path, in points. 
300299        shadow_color : color, default: 'black' 
301300            The shadow color. 
302301            A value of ``None`` takes the original artist's color 
@@ -354,8 +353,8 @@ def __init__(self, offset=(0, 0), **kwargs):
354353        """ 
355354        Parameters 
356355        ---------- 
357-         offset : pair of floats  
358-             The offset to apply to the path, in points. 
356+         offset : (float, float), default: (0, 0)  
357+             The (x, y)  offset to apply to the path, in points. 
359358        **kwargs 
360359            All keyword arguments are passed through to the 
361360            :class:`~matplotlib.patches.PathPatch` constructor. The 
@@ -401,8 +400,8 @@ def __init__(self, offset=(0, 0),
401400        """ 
402401        Parameters 
403402        ---------- 
404-         offset : pair of floats , default: (0, 0) 
405-             The offset to apply to the path, in points. 
403+         offset : (float, float) , default: (0, 0) 
404+             The (x, y)  offset to apply to the path, in points. 
406405        spacing : float, default: 10.0 
407406            The spacing between ticks in points. 
408407        angle : float, default: 45.0 
@@ -430,9 +429,7 @@ def __init__(self, offset=(0, 0),
430429        self ._gc  =  kwargs 
431430
432431    def  draw_path (self , renderer , gc , tpath , affine , rgbFace ):
433-         """ 
434-         Draw the path with updated gc. 
435-         """ 
432+         """Draw the path with updated gc.""" 
436433        # Do not modify the input! Use copy instead. 
437434        gc0  =  renderer .new_gc ()
438435        gc0 .copy_properties (gc )
@@ -445,7 +442,7 @@ def draw_path(self, renderer, gc, tpath, affine, rgbFace):
445442                                 [np .sin (theta ), np .cos (theta )]])
446443
447444        # Convert spacing parameter to pixels. 
448-         spcpx  =  renderer .points_to_pixels (self ._spacing )
445+         spacing_px  =  renderer .points_to_pixels (self ._spacing )
449446
450447        # Transform before evaluation because to_polygons works at resolution 
451448        # of one -- assuming it is working in pixel space. 
@@ -469,11 +466,11 @@ def draw_path(self, renderer, gc, tpath, affine, rgbFace):
469466
470467            # Build parametric coordinate along curve 
471468            s  =  np .concatenate (([0.0 ], np .cumsum (ds )))
472-             stot  =  s [- 1 ]
469+             s_total  =  s [- 1 ]
473470
474-             num  =  int (np .ceil (stot  /  spcpx )) - 1 
471+             num  =  int (np .ceil (s_total  /  spacing_px ))  -   1 
475472            # Pick parameter values for ticks. 
476-             s_tick  =  np .linspace (spcpx / 2 , stot - spcpx / 2 , num )
473+             s_tick  =  np .linspace (spacing_px / 2 , s_total   -   spacing_px / 2 , num )
477474
478475            # Find points along the parameterized curve 
479476            x_tick  =  np .interp (s_tick , s , x )
@@ -493,7 +490,7 @@ def draw_path(self, renderer, gc, tpath, affine, rgbFace):
493490            uv [mask ] =  np .array ([0 , 0 ]).T 
494491
495492            # Rotate and scale unit vector into tick vector 
496-             dxy  =  np .dot (uv , trans_matrix ) *  self ._length  *  spcpx 
493+             dxy  =  np .dot (uv , trans_matrix ) *  self ._length  *  spacing_px 
497494
498495            # Build tick endpoints 
499496            x_end  =  x_tick  +  dxy [:, 0 ]
0 commit comments