8000 DOC: patch up documentation on Axes · matplotlib/matplotlib@474f1ee · GitHub
[go: up one dir, main page]

Skip to content

Commit 474f1ee

Browse files
committed
DOC: patch up documentation on Axes
1 parent 0de8fed commit 474f1ee

File tree

2 files changed

+39
-22
lines changed

2 files changed

+39
-lib/matplotlib/axes/_axes.py
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ class Axes(_AxesBase):
107107
"""
108108
### Labelling, legend and texts
109109

110+
aname = 'Axes'
111+
110112
def get_title(self, loc="center"):
111113
"""Get an axes title.
112114

lib/matplotlib/axes/_base.py

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,9 @@ def get_position(self, original=False):
844844
return self._position.frozen()
845845

846846
def set_position(self, pos, which='both'):
847-
"""
848-
Set the axes position with::
847+
"""Set the axes position
848+
849+
The expected shape of ``pos`` is::
849850
850851
pos = [left, bottom, width, height]
851852
@@ -1188,13 +1189,14 @@ def ishold(self):
11881189
return self._hold
11891190

11901191
def hold(self, b=None):
1191-
"""
1192+
"""Set the hold state
1193+
11921194
Call signature::
11931195
11941196
hold(b=None)
11951197
1196-
Set the hold state. If *hold* is *None* (default), toggle the
1197-
*hold* state. Else set the *hold* state to boolean value *b*.
1198+
If *hold* is *None* (default), toggle the *hold* state. Else
1199+
set the *hold* state to boolean value *b*.
11981200
11991201
Examples::
12001202
@@ -2727,11 +2729,16 @@ def xaxis_inverted(self):
27272729
return right < left
27282730

27292731
def get_xbound(self):
2730-
"""
2731-
Returns the x-axis numerical bounds where::
2732+
"""Returns the x-axis numerical bounds
2733+
2734+
This always returns::
27322735
27332736
lowerBound < upperBound
27342737
2738+
Returns
2739+
-------
2740+
lowerBound, upperBound : float
2741+
27352742
"""
27362743
left, right = self.get_xlim()
27372744
if left < right:
@@ -2773,7 +2780,8 @@ def get_xlim(self):
27732780
return tuple(self.viewLim.intervalx)
27742781

27752782
def set_xlim(self, left=None, right=None, emit=True, auto=False, **kw):
2776-
"""
2783+
"""Set the data limits for the xaxis
2784+
27772785
Call signature::
27782786
27792787
set_xlim(self, *args, **kwargs):
@@ -2871,7 +2879,8 @@ def get_xscale(self):
28712879

28722880
@docstring.dedent_interpd
28732881
def set_xscale(self, value, **kwargs):
2874-
"""
2882+
"""Set the x-axis scale
2883+
28752884
Call signature::
28762885
28772886
set_xscale(value)
@@ -2953,12 +2962,13 @@ def get_xticklabels(self, minor=False, which=None):
29532962

29542963
@docstring.dedent_interpd
29552964
def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
2956-
"""
2965+
"""Set the xtick labels with list of strings *labels*
2966+
29572967
Call signature::
29582968
29592969
set_xticklabels(labels, fontdict=None, minor=False, **kwargs)
29602970
2961-
Set the xtick labels with list of strings *labels*. Return a
2971+
Return a
29622972
list of axis text instances.
29632973
29642974
*kwargs* set the :class:`~matplotlib.text.Text` properties.
@@ -3031,13 +3041,12 @@ def get_ylim(self):
30313041
return tuple(self.viewLim.intervaly)
30323042

30333043
def set_ylim(self, bottom=None, top=None, emit=True, auto=False, **kw):
3034-
"""
3044+
"""Set the data limits for the yaxis
3045+
30353046
Call signature::
30363047
30373048
set_ylim(self, *args, **kwargs):
30383049
3039-
Set the data limits for the yaxis
3040-
30413050
Examples::
30423051
30433052
set_ylim((bottom, top))
@@ -3130,7 +3139,8 @@ def get_yscale(self):
31303139

31313140
@docstring.dedent_interpd
31323141
def set_yscale(self, value, **kwargs):
3133-
"""
3142+
"""Set the y-axis scale
3143+
31343144
Call signature::
31353145
31363146
set_yscale(value)
@@ -3215,12 +3225,13 @@ def get_yticklabels(self, minor=False, which=None):
32153225

32163226
@docstring.dedent_interpd
32173227
def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs):
3218-
"""
3228+
"""Set the y tick labels with list of strings *labels*
3229+
32193230
Call signature::
32203231
32213232
set_yticklabels(labels, fontdict=None, minor=False, **kwargs)
32223233
3223-
Set the y tick labels with list of strings *labels*. Return a list of
3234+
Return a list of
32243235
:class:`~matplotlib.text.Text` instances.
32253236
32263237
*kwargs* set :class:`~matplotlib.text.Text` properties for the labels.
@@ -3626,8 +3637,9 @@ def get_cursor_props(self):
36263637
return self._cursorProps
36273638

36283639
def set_cursor_props(self, *args):
3629-
"""
3630-
Set the cursor property as::
3640+
"""Set the cursor property as
3641+
3642+
Call signature ::
36313643
36323644
ax.set_cursor_props(linewidth, color)
36333645
@@ -3688,7 +3700,8 @@ def contains_point(self, point):
36883700
return self.patch.contains_point(point, radius=1.0)
36893701

36903702
def pick(self, *args):
3691-
"""
3703+
"""Trigger pick event
3704+
36923705
Call signature::
36933706
36943707
pick(mouseevent)
@@ -3760,7 +3773,8 @@ def _make_twin_axes(self, *kl, **kwargs):
37603773
return ax2
37613774

37623775
def twinx(self):
3763-
"""
3776+
"""Create a twin Axes sharing the xaxis
3777+
37643778
Call signature::
37653779
37663780
ax = twinx()
@@ -3785,7 +3799,8 @@ def twinx(self):
37853799
return ax2
37863800

37873801
def twiny(self):
3788-
"""
3802+
"""Create a twin Axes sharing the yaxis
3803+
37893804
Call signature::
37903805
37913806
ax = twiny()

0 commit comments

Comments
 (0)
0