10
10
11
11
class Spine (mpatches .Patch ):
12
12
"""
13
- An axis spine -- the line noting the data area boundaries
13
+ An axis spine -- the line noting the data area boundaries.
14
14
15
15
Spines are the lines connecting the axis tick marks and noting the
16
16
boundaries of the data area. They can be placed at arbitrary
17
- positions. See function:`~matplotlib.spines.Spine.set_position`
18
- for more information.
17
+ positions. See `~.Spine.set_position` for more information.
19
18
20
19
The default position is ``('outward', 0)``.
21
20
22
- Spines are subclasses of class:`~matplotlib.patches.Patch`, and
23
- inherit much of their behavior.
21
+ Spines are subclasses of `.Patch`, and inherit much of their behavior.
24
22
25
23
Spines draw a line, a circle, or an arc depending if
26
- function:`~matplotlib.spines.Spine.set_patch_line`,
27
- function:`~matplotlib.spines.Spine.set_patch_circle`, or
28
- function:`~matplotlib.spines.Spine.set_patch_arc` has been called.
29
- Line-like is the default.
24
+ `~.Spine.set_patch_line`, `~.Spine.set_patch_circle`, or
25
+ `~.Spine.set_patch_arc` has been called. Line-like is the default.
30
26
31
27
"""
32
28
def __str__ (self ):
@@ -223,7 +219,8 @@ def _ensure_position_is_set(self):
223
219
self .set_position (self ._position )
224
220
225
221
def register_axis (self , axis ):
226
- """Register an axis.
222
+ """
223
+ Register an axis.
227
224
228
225
An axis should be registered with its corresponding spine from
229
226
the Axes instance. This allows the spine to clear any axis
@@ -486,9 +483,7 @@ def get_bounds(self):
486
483
487
484
@classmethod
488
485
def linear_spine (cls , axes , spine_type , ** kwargs ):
489
- """
490
- Returns a linear `Spine`.
491
- """
486
+ """Create and return a linear `Spine`."""
492
487
# all values of 0.999 get replaced upon call to set_bounds()
493
488
if spine_type == 'left' :
494
489
path = mpath .Path ([(0.0 , 0.999 ), (0.0 , 0.999 )])
@@ -508,19 +503,15 @@ def linear_spine(cls, axes, spine_type, **kwargs):
508
503
@classmethod
509
504
def arc_spine (cls , axes , spine_type , center , radius , theta1 , theta2 ,
510
505
** kwargs ):
511
- """
512
- Returns an arc `Spine`.
513
- """
506
+ """Create and return an arc `Spine`."""
514
507
path = mpath .Path .arc (theta1 , theta2 )
515
508
result = cls (axes , spine_type , path , ** kwargs )
516
509
result .set_patch_arc (center , radius , theta1 , theta2 )
517
510
return result
518
511
519
512
@classmethod
520
513
def circular_spine (cls , axes , center , radius , ** kwargs ):
521
- """
522
- Returns a circular `Spine`.
523
- """
514
+ """Create and return a circular `Spine`."""
524
515
path = mpath .Path .unit_circle ()
525
516
spine_type = 'circle'
526
517
result = cls (axes , spine_type , path , ** kwargs )
0 commit comments