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

Skip to content

Commit f584db9

Browse files
committed
Use tables for Locator and Formatter docs
1 parent 67d04a8 commit f584db9

File tree

1 file changed

+43
-79
lines changed

1 file changed

+43
-79
lines changed

lib/matplotlib/ticker.py

Lines changed: 43 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -18,46 +18,31 @@
1818
`MultipleLocator`. It is initialized with a base, e.g., 10, and it picks
1919
axis limits and ticks that are multiples of that base.
2020
21-
The Locator subclasses defined here are
22-
23-
:class:`AutoLocator`
24-
`MaxNLocator` with simple defaults. This is the default tick locator for
25-
most plotting.
26-
27-
:class:`MaxNLocator`
28-
Finds up to a max number of intervals with ticks at nice locations.
29-
30-
:class:`LinearLocator`
31-
Space ticks evenly from min to max.
32-
33-
:class:`LogLocator`
34-
Space ticks logarithmically from min to max.
35-
36-
:class:`MultipleLocator`
37-
Ticks and range are a multiple of base; either integer or float.
38-
39-
:class:`FixedLocator`
40-
Tick locations are fixed.
41-
42-
:class:`IndexLocator`
43-
Locator for index plots (e.g., where ``x = range(len(y))``).
44-
45-
:class:`NullLocator`
46-
No ticks.
47-
48-
:class:`SymmetricalLogLocator`
49-
Locator for use with with the symlog norm; works like `LogLocator` for the
50-
part outside of the threshold and adds 0 if inside the limits.
51-
52-
:class:`LogitLocator`
53-
Locator for logit scaling.
54-
55-
:class:`AutoMinorLocator`
56-
Locator for minor ticks when the axis is linear and the
57-
major ticks are uniformly spaced. Subdivides the major
58-
tick interval into a specified number of minor intervals,
59-
defaulting to 4 or 5 depending on the major interval.
60-
21+
The Locator subclasses defined here are:
22+
23+
======================= =======================================================
24+
`AutoLocator` `MaxNLocator` with simple defaults. This is the default
25+
tick locator for most plotting.
26+
`MaxNLocator` Finds up to a max number of intervals with ticks at
27+
nice locations.
28+
`LinearLocator` Space ticks evenly from min to max.
29+
`LogLocator` Space ticks logarithmically from min to max.
30+
`MultipleLocator` Ticks and range are a multiple of base; either integer
31+
or float.
32+
`FixedLocator` Tick locations are fixed.
33+
`IndexLocator` Locator for index plots (e.g., where
34+
``x = range(len(y))``).
35+
`NullLocator` No ticks.
36+
`SymmetricalLogLocator` Locator for use with with the symlog norm; works like
37+
`LogLocator` for the part outside of the threshold and
38+
adds 0 if inside the limits.
39+
`LogitLocator` Locator for logit scaling.
40+
`AutoMinorLocator` Locator for minor ticks when the axis is linear and the
41+
major ticks are uniformly spaced. Subdivides the major
42+
tick interval into a specified number of minor
43+
intervals, defaulting to 4 or 5 depending on the major
44+
interval.
45+
======================= =======================================================
6146
6247
There are a number of locators specialized for date locations - see
6348
the :mod:`.dates` module.
@@ -96,45 +81,24 @@
9681
Tick formatting is controlled by classes derived from Formatter. The formatter
9782
operates on a single tick value and returns a string to the axis.
9883
99-
:class:`NullFormatter`
100-
No labels on the ticks.
101-
102-
:class:`FixedFormatter`
103-
Set the strings manually for the labels.
104-
105-
:class:`FuncFormatter`
106-
User defined function sets the labels.
107-
108-
:class:`StrMethodFormatter`
109-
Use string `format` method.
110-
111-
:class:`FormatStrFormatter`
112-
Use an old-style sprintf format string.
113-
114-
:class:`ScalarFormatter`
115-
Default formatter for scalars: autopick the format string.
116-
117-
:class:`LogFormatter`
118-
Formatter for log axes.
119-
120-
:class:`LogFormatterExponent`
121-
Format values for log axis using ``exponent = log_base(value)``.
122-
123-
:class:`LogFormatterMathtext`
124-
Format values for log axis using ``exponent = log_base(value)``
125-
using Math text.
126-
127-
:class:`LogFormatterSciNotation`
128-
Format values for log axis using scientific notation.
129-
130-
:class:`LogitFormatter`
131-
Probability formatter.
132-
133-
:class:`EngFormatter`
134-
Format labels in engineering notation.
135-
136-
:class:`PercentFormatter`
137-
Format labels as a percentage.
84+
========================= =====================================================
85+
`NullFormatter` No labels on the ticks.
86+
`FixedFormatter` Set the strings manually for the labels.
87+
`FuncFormatter` User defined function sets the labels.
88+
`StrMethodFormatter` Use string `format` method.
89+
`FormatStrFormatter` Use an old-style sprintf format string.
90+
`ScalarFormatter` Default formatter for scalars: autopick the format
91+
string.
92+
`LogFormatter` Formatter for log axes.
93+
`LogFormatterExponent` Format values for log axis using
94+
``exponent = log_base(value)``.
95+
`LogFormatterMathtext` Format values for log axis using
96+
``exponent = log_base(value)`` using Math text.
97+
`LogFormatterSciNotation` Format values for log axis using scientific notation.
98+
`LogitFormatter` Probability formatter.
99+
`EngFormatter` Format labels in engineering notation.
100+
`PercentFormatter` Format labels as a percentage.
101+
========================= =====================================================
138102
139103
You can derive your own formatter from the Formatter base class by
140104
simply overriding the ``__call__`` method. The formatter class has

0 commit comments

Comments
 (0)