Skip to content

Commit 8badcec

Browse files
authored
Merge pull request #16839 from timhoffm/small-doc
spines doc cleanup
2 parents 7d9bf0a + 2327ba0 commit 8badcec

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

lib/matplotlib/spines.py

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,19 @@
1010

1111
class Spine(mpatches.Patch):
1212
"""
13-
An axis spine -- the line noting the data area boundaries
13+
An axis spine -- the line noting the data area boundaries.
1414
1515
Spines are the lines connecting the axis tick marks and noting the
1616
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.
1918
2019
The default position is ``('outward', 0)``.
2120
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.
2422
2523
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.
3026
3127
"""
3228
def __str__(self):
@@ -223,7 +219,8 @@ def _ensure_position_is_set(self):
223219
self.set_position(self._position)
224220

225221
def register_axis(self, axis):
226-
"""Register an axis.
222+
"""
223+
Register an axis.
227224
228225
An axis should be registered with its corresponding spine from
229226
the Axes instance. This allows the spine to clear any axis
@@ -486,9 +483,7 @@ def get_bounds(self):
486483

487484
@classmethod
488485
def linear_spine(cls, axes, spine_type, **kwargs):
489-
"""
490-
Returns a linear `Spine`.
491-
"""
486+
"""Create and return a linear `Spine`."""
492487
# all values of 0.999 get replaced upon call to set_bounds()
493488
if spine_type == 'left':
494489
path = mpath.Path([(0.0, 0.999), (0.0, 0.999)])
@@ -508,19 +503,15 @@ def linear_spine(cls, axes, spine_type, **kwargs):
508503
@classmethod
509504
def arc_spine(cls, axes, spine_type, center, radius, theta1, theta2,
510505
**kwargs):
511-
"""
512-
Returns an arc `Spine`.
513-
"""
506+
"""Create and return an arc `Spine`."""
514507
path = mpath.Path.arc(theta1, theta2)
515508
result = cls(axes, spine_type, path, **kwargs)
516509
result.set_patch_arc(center, radius, theta1, theta2)
517510
return result
518511

519512
@classmethod
520513
def circular_spine(cls, axes, center, radius, **kwargs):
521-
"""
522-
Returns a circular `Spine`.
523-
"""
514+
"""Create and return a circular `Spine`."""
524515
path = mpath.Path.unit_circle()
525516
spine_type = 'circle'
526517
result = cls(axes, spine_type, path, **kwargs)

lib/matplotlib/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ class TransformWrapper(Transform):
16181618

16191619
def __init__(self, child):
16201620
"""
1621-
*child*: A class:`Transform` instance. This child may later
1621+
*child*: A `Transform` instance. This child may later
16221622
be replaced with :meth:`set`.
16231623
"""
16241624
cbook._check_isinstance(Transform, child=child)

0 commit comments

Comments
 (0)