Skip to content

Commit 85ee55b

Browse files
committed
Whitespace fixups
1 parent b34974b commit 85ee55b

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

lib/matplotlib/ticker.py

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@
33
============================
44
55
This module contains classes to support completely configurable tick
6-
locating and formatting. Although the locators know nothing about major
6+
locating and formatting. Although the locators know nothing about major
77
or minor ticks, they are used by the Axis class to support major and
8-
minor tick locating and formatting. Generic tick locators and
8+
minor tick locating and formatting. Generic tick locators and
99
formatters are provided, as well as domain specific custom ones.
1010
1111
Default Formatter
1212
-----------------
1313
14-
The default formatter identifies when the x-data being
15-
plotted is a small range on top of a large off set. To
16-
reduce the chances that the ticklabels overlap the ticks
17-
are labeled as deltas from a fixed offset. For example::
14+
The default formatter identifies when the x-data being plotted is a
15+
small range on top of a large off set. To reduce the chances that the
16+
ticklabels overlap the ticks are labeled as deltas from a fixed offset.
17+
For example::
1818
1919
ax.plot(np.arange(2000, 2010), range(10))
2020
21-
will have tick of 0-9 with an offset of +2e3. If this
22-
is not desired turn off the use of the offset on the default
23-
formatter::
21+
will have tick of 0-9 with an offset of +2e3. If this is not desired
22+
turn off the use of the offset on the default formatter::
2423
2524
ax.get_xaxis().get_major_formatter().set_useOffset(False)
2625
@@ -30,11 +29,11 @@
3029
Tick locating
3130
-------------
3231
33-
The Locator class is the base class for all tick locators. The locators
32+
The Locator class is the base class for all tick locators. The locators
3433
handle autoscaling of the view limits based on the data limits, and the
35-
choosing of tick locations. A useful semi-automatic tick locator is
36-
MultipleLocator. You initialize this with a base, e.g., 10, and it
37-
picks axis limits and ticks that are multiples of your base.
34+
choosing of tick locations. A useful semi-automatic tick locator is
35+
`MultipleLocator`. It is initialized with a base, e.g., 10, and it picks
36+
axis limits and ticks that are multiples of that base.
3837
3938
The Locator subclasses defined here are
4039
@@ -59,8 +58,8 @@
5958
inside the limits
6059
6160
:class:`MultipleLocator`
62-
ticks and range are a multiple of base;
63-
either integer or float
61+
ticks and range are a multiple of base; either integer or float
62+
6463
:class:`OldAutoLocator`
6564
choose a MultipleLocator and dyamically reassign it for
6665
intelligent ticking during navigation
@@ -74,7 +73,7 @@
7473
7574
:class:`AutoMinorLocator`
7675
locator for minor ticks when the axis is linear and the
77-
major ticks are uniformly spaced. It subdivides the major
76+
major ticks are uniformly spaced. It subdivides the major
7877
tick interval into a specified number of minor intervals,
7978
defaulting to 4 or 5 depending on the major interval.
8079
@@ -85,13 +84,13 @@
8584
There are a number of locators specialized for date locations - see
8685
the dates module
8786
88-
You can define your own locator by deriving from Locator. You must
89-
override the __call__ method, which returns a sequence of locations,
87+
You can define your own locator by deriving from Locator. You must
88+
override the ``__call__`` method, which returns a sequence of locations,
9089
and you will probably want to override the autoscale method to set the
9190
view limits from the data limits.
9291
9392
If you want to override the default locator, use one of the above or a
94-
custom locator and pass it to the x or y axis instance. The relevant
93+
custom locator and pass it to the x or y axis instance. The relevant
9594
methods are::
9695
9796
ax.xaxis.set_major_locator( xmajorLocator )
@@ -105,7 +104,7 @@
105104
Tick formatting
106105
---------------
107106
108-
Tick formatting is controlled by classes derived from Formatter. The
107+
Tick formatting is controlled by classes derived from Formatter. The
109108
formatter operates on a single tick value and returns a string to the
110109
axis.
111110
@@ -153,7 +152,7 @@
153152
Format labels as a percentage
154153
155154
You can derive your own formatter from the Formatter base class by
156-
simply overriding the ``__call__`` method. The formatter class has
155+
simply overriding the ``__call__`` method. The formatter class has
157156
access to the axis view and data limits.
158157
159158
To control the major and minor tick label formats, use one of the
@@ -165,7 +164,7 @@
165164
ax.yaxis.set_minor_formatter( yminorFormatter )
166165
167166
See :ref:`pylab_examples-major_minor_demo1` for an example of setting
168-
major and minor ticks. See the :mod:`matplotlib.dates` module for
167+
major and minor ticks. See the :mod:`matplotlib.dates` module for
169168
more information and examples of using date locators and formatters.
170169
"""
171170

0 commit comments

Comments
 (0)