Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9ec6822

Browse filesBrowse files
committed
Minor doc markup fixes.
1 parent 963f913 commit 9ec6822
Copy full SHA for 9ec6822

File tree

Expand file treeCollapse file tree

3 files changed

+51
-58
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+51
-58
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+13-15Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,28 +3062,27 @@ def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
30623062
Parameters
30633063
----------
30643064
labels : list of str
3065-
list of string labels
3065+
List of string labels.
30663066
30673067
fontdict : dict, optional
3068-
A dictionary controlling the appearance of the ticklabels,
3069-
the default `fontdict` is:
3068+
A dictionary controlling the appearance of the ticklabels.
3069+
The default `fontdict` is::
30703070
30713071
{'fontsize': rcParams['axes.titlesize'],
3072-
'fontweight' : rcParams['axes.titleweight'],
3072+
'fontweight': rcParams['axes.titleweight'],
30733073
'verticalalignment': 'baseline',
30743074
'horizontalalignment': loc}
30753075
30763076
minor : bool, optional
3077-
If True select the minor ticklabels,
3078-
else select the minor ticklabels
3077+
Whether to set the minor ticklabels rather than the major ones.
30793078
30803079
Returns
30813080
-------
3082-
A list of `~matplotlib.text.Text` instances
3081+
A list of `~.Text` instances.
30833082
30843083
Other Parameters
30853084
-----------------
3086-
**kwargs : `~matplotlib.text.Text` properties.
3085+
**kwargs : `~.Text` properties.
30873086
"""
30883087
if fontdict is not None:
30893088
kwargs.update(fontdict)
@@ -3385,25 +3384,24 @@ def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs):
33853384
list of string labels
33863385
33873386
fontdict : dict, optional
3388-
A dictionary controlling the appearance of the ticklabels,
3389-
the default `fontdict` is::
3387+
A dictionary controlling the appearance of the ticklabels.
3388+
The default `fontdict` is::
33903389
33913390
{'fontsize': rcParams['axes.titlesize'],
3392-
'fontweight' : rcParams['axes.titleweight'],
3391+
'fontweight': rcParams['axes.titleweight'],
33933392
'verticalalignment': 'baseline',
33943393
'horizontalalignment': loc}
33953394
33963395
minor : bool, optional
3397-
If True select the minor ticklabels,
3398-
else select the minor ticklabels
3396+
Whether to set the minor ticklabels rather than the major ones.
33993397
34003398
Returns
34013399
-------
3402-
A list of `~matplotlib.text.Text` instances.
3400+
A list of `~.Text` instances.
34033401
34043402
Other Parameters
34053403
----------------
3406-
**kwargs : `~matplotlib.text.Text` properties.
3404+
**kwargs : `~.Text` properties.
34073405
"""
34083406
if fontdict is not None:
34093407
kwargs.update(fontdict)

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ def add_subplot(self, *args, **kwargs):
987987
grid with J rows and K columns.
988988
989989
projection : ['aitoff' | 'hammer' | 'lambert' | \
990-
'mollweide', 'polar' | 'rectilinear'], optional
990+
'mollweide' | 'polar' | 'rectilinear'], optional
991991
The projection type of the axes.
992992
993993
polar : boolean, optional

‎lib/matplotlib/ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/ticker.py
+37-42Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.