Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b84cadd

Browse files
anntzertacaswell
authored andcommitted
Minor doc markup fixes.
1 parent e10c523 commit b84cadd

File tree

3 files changed

+51
-58
lines changed

3 files changed

+51
-58
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3061,28 +3061,27 @@ def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
30613061
Parameters
30623062
----------
30633063
labels : list of str
3064-
list of string labels
3064+
List of string labels.
30653065
30663066
fontdict : dict, optional
3067-
A dictionary controlling the appearance of the ticklabels,
3068-
the default `fontdict` is:
3067+
A dictionary controlling the appearance of the ticklabels.
3068+
The default `fontdict` is::
30693069
30703070
{'fontsize': rcParams['axes.titlesize'],
3071-
'fontweight' : rcParams['axes.titleweight'],
3071+
'fontweight': rcParams['axes.titleweight'],
30723072
'verticalalignment': 'baseline',
30733073
'horizontalalignment': loc}
30743074
30753075
minor : bool, optional
3076-
If True select the minor ticklabels,
3077-
else select the minor ticklabels
3076+
Whether to set the minor ticklabels rather than the major ones.
30783077
30793078
Returns
30803079
-------
3081-
A list of `~matplotlib.text.Text` instances
3080+
A list of `~.Text` instances.
30823081
30833082
Other Parameters
30843083
-----------------
3085-
**kwargs : `~matplotlib.text.Text` properties.
3084+
**kwargs : `~.Text` properties.
30863085
"""
30873086
if fontdict is not None:
30883087
kwargs.update(fontdict)
@@ -3384,25 +3383,24 @@ def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs):
33843383
list of string labels
33853384
33863385
fontdict : dict, optional
3387-
A dictionary controlling the appearance of the ticklabels,
3388-
the default `fontdict` is::
3386+
A dictionary controlling the appearance of the ticklabels.
3387+
The default `fontdict` is::
33893388
33903389
{'fontsize': rcParams['axes.titlesize'],
3391-
'fontweight' : rcParams['axes.titleweight'],
3390+
'fontweight': rcParams['axes.titleweight'],
33923391
'verticalalignment': 'baseline',
33933392
'horizontalalignment': loc}
33943393
33953394
minor : bool, optional
3396-
If True select the minor ticklabels,
3397-
else select the minor ticklabels
3395+
Whether to set the minor ticklabels rather than the major ones.
33983396
33993397
Returns
34003398
-------
3401-
A list of `~matplotlib.text.Text` instances.
3399+
A list of `~.Text` instances.
34023400
34033401
Other Parameters
34043402
----------------
3405-
**kwargs : `~matplotlib.text.Text` properties.
3403+
**kwargs : `~.Text` properties.
34063404
"""
34073405
if fontdict is not None:
34083406
kwargs.update(fontdict)

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ def add_subplot(self, *args, **kwargs):
988988
grid with J rows and K columns.
989989
990990
projection : ['aitoff' | 'hammer' | 'lambert' | \
991-
'mollweide', 'polar' | 'rectilinear'], optional
991+
'mollweide' | 'polar' | 'rectilinear'], optional
992992
The projection type of the axes.
993993
994994
polar : boolean, optional

lib/matplotlib/ticker.py

Lines changed: 37 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -38,99 +38,94 @@
3838
The Locator subclasses defined here are
3939
4040
:class:`NullLocator`
41-
No ticks
41+
No ticks.
4242
4343
:class:`FixedLocator`
44-
Tick locations are fixed
44+
Tick locations are fixed.
4545
4646
:class:`IndexLocator`
47-
locator for index plots (e.g., where x = range(len(y)))
47+
Locator for index plots (e.g., where ``x = range(len(y))``).
4848
4949
:class:`LinearLocator`
50-
evenly spaced ticks from min to max
50+
Evenly spaced ticks from min to max.
5151
5252
:class:`LogLocator`
53-
logarithmically ticks from min to max
53+
Logarithmically ticks from min to max.
5454
5555
:class:`SymmetricalLogLocator`
56-
locator for use with with the symlog norm, works like the
57-
`LogLocator` for the part outside of the threshold and add 0 if
58-
inside the limits
56+
Locator for use with with the symlog norm; works like `LogLocator` for the
57+
part outside of the threshold and add 0 if inside the limits.
5958
6059
:class:`MultipleLocator`
61-
ticks and range are a multiple of base; either integer or float
60+
Ticks and range are a multiple of base; either integer or float.
6261
6362
:class:`OldAutoLocator`
64-
choose a MultipleLocator and dyamically reassign it for
65-
intelligent ticking during navigation
63+
Choose a `MultipleLocator` and dyamically reassign it for intelligent
64+
ticking during navigation.
6665
6766
:class:`MaxNLocator`
68-
finds up to a max number of ticks at nice locations
67+
Finds up to a max number of ticks at nice locations.
6968
7069
:class:`AutoLocator`
71-
:class:`MaxNLocator` with simple defaults. This is the default
72-
tick locator for most plotting.
70+
`MaxNLocator` with simple defaults. This is the default tick locator for
71+
most plotting.
7372
7473
:class:`AutoMinorLocator`
75-
locator for minor ticks when the axis is linear and the
76-
major ticks are uniformly spaced. It subdivides the major
74+
Locator for minor ticks when the axis is linear and the
75+
major ticks are uniformly spaced. Subdivides the major
7776
tick interval into a specified number of minor intervals,
7877
defaulting to 4 or 5 depending on the major interval.
7978
8079
:class:`LogitLocator`
8180
Locator for logit scaling.
8281
83-
8482
There are a number of locators specialized for date locations - see
85-
the dates module
83+
the `dates` module.
8684
8785
You can define your own locator by deriving from Locator. You must
8886
override the ``__call__`` method, which returns a sequence of locations,
8987
and you will probably want to override the autoscale method to set the
9088
view limits from the data limits.
9189
92-
If you want to override the default locator, use one of the above or a
93-
custom locator and pass it to the x or y axis instance. The relevant
94-
methods are::
90+
If you want to override the default locator, use one of the above or a custom
91+
locator and pass it to the x or y axis instance. The relevant methods are::
9592
96-
ax.xaxis.set_major_locator( xmajorLocator )
97-
ax.xaxis.set_minor_locator( xminorLocator )
98-
ax.yaxis.set_major_locator( ymajorLocator )
99-
ax.yaxis.set_minor_locator( yminorLocator )
93+
ax.xaxis.set_major_locator(xmajor_locator)
94+
ax.xaxis.set_minor_locator(xminor_locator)
95+
ax.yaxis.set_major_locator(ymajor_locator)
96+
ax.yaxis.set_minor_locator(yminor_locator)
10097
101-
The default minor locator is the NullLocator, e.g., no minor ticks on by
102-
default.
98+
The default minor locator is `NullLocator`, i.e., no minor ticks on by default.
10399
104100
Tick formatting
105101
---------------
106102
107-
Tick formatting is controlled by classes derived from Formatter. The
108-
formatter operates on a single tick value and returns a string to the
109-
axis.
103+
Tick formatting is controlled by classes derived from Formatter. The formatter
104+
operates on a single tick value and returns a string to the axis.
110105
111106
:class:`NullFormatter`
112-
No labels on the ticks
107+
No labels on the ticks.
113108
114109
:class:`IndexFormatter`
115-
Set the strings from a list of labels
110+
Set the strings from a list of labels.
116111
117112
:class:`FixedFormatter`
118-
Set the strings manually for the labels
113+
Set the strings manually for the labels.
119114
120115
:class:`FuncFormatter`
121-
User defined function sets the labels
116+
User defined function sets the labels.
122117
123118
:class:`StrMethodFormatter`
124-
Use string `format` method
119+
Use string `format` method.
125120
126121
:class:`FormatStrFormatter`
127-
Use an old-style sprintf format string
122+
Use an old-style sprintf format string.
128123
129124
:class:`ScalarFormatter`
130-
Default formatter for scalars: autopick the format string
125+
Default formatter for scalars: autopick the format string.
131126
132127
:class:`LogFormatter`
133-
Formatter for log axes
128+
Formatter for log axes.
134129
135130
:class:`LogFormatterExponent`
136131
Format values for log axis using ``exponent = log_base(value)``.
@@ -158,10 +153,10 @@
158153
To control the major and minor tick label formats, use one of the
159154
following methods::
160155
161-
ax.xaxis.set_major_formatter( xmajorFormatter )
162-
ax.xaxis.set_minor_formatter( xminorFormatter )
163-
ax.yaxis.set_major_formatter( ymajorFormatter )
164-
ax.yaxis.set_minor_formatter( yminorFormatter )
156+
ax.xaxis.set_major_formatter(xmajor_formatter)
157+
ax.xaxis.set_minor_formatter(xminor_formatter)
158+
ax.yaxis.set_major_formatter(ymajor_formatter)
159+
ax.yaxis.set_minor_formatter(yminor_formatter)
165160
166161
See :ref:`sphx_glr_gallery_ticks_and_spines_major_minor_demo.py` for an
167162
example of setting major and minor ticks. See the :mod:`matplotlib.dates`

0 commit comments

Comments
 (0)