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

Skip to content

Commit c94d0b1

Browse files
committed
DOC: Wrapped to 72 chars and fixed a couple of missed spots
1 parent 864a6cc commit c94d0b1

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

lib/matplotlib/ticker.py

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Tick locating and formatting
33
============================
44
5-
This module contains classes to support completely configurable tick locating
6-
and formatting. Although the locators know nothing about major or minor
7-
ticks, they are used by the Axis class to support major and minor tick
8-
locating and formatting. Generic tick locators and formatters are provided,
9-
as well as domain specific custom ones..
5+
This module contains classes to support completely configurable tick
6+
locating and formatting. Although the locators know nothing about major
7+
or minor ticks, they are used by the Axis class to support major and
8+
minor tick locating and formatting. Generic tick locators and
9+
formatters are provided, as well as domain specific custom ones..
1010
1111
1212
Default Formatter
@@ -35,8 +35,8 @@
3535
The Locator class is the base class for all tick locators. The locators
3636
handle autoscaling of the view limits based on the data limits, and the
3737
choosing of tick locations. A useful semi-automatic tick locator is
38-
MultipleLocator. You initialize this with a base, e.g., 10, and it picks axis
39-
limits and ticks that are multiples of your base.
38+
MultipleLocator. You initialize this with a base, e.g., 10, and it
39+
picks axis limits and ticks that are multiples of your base.
4040
4141
The Locator subclasses defined here are
4242
@@ -56,8 +56,9 @@
5656
logarithmically ticks from min to max
5757
5858
:class:`SymmetricalLogLocator`
59-
locator for use with with the symlog norm, works like the `LogLocator` for
60-
the part outside of the threshold and add 0 if inside the limits
59+
locator for use with with the symlog norm, works like the
60+
`LogLocator` for the part outside of the threshold and add 0 if
61+
inside the limits
6162
6263
:class:`MultipleLocator`
6364
ticks and range are a multiple of base;
@@ -790,8 +791,13 @@ def __init__(self, base=10.0, labelOnlyBase=True):
790791
self.labelOnlyBase = labelOnlyBase
791792

792793
def base(self, base):
793-
"""change the *base* for labeling - warning: should always match the
794-
base used for :class:`LogLocator`"""
794+
"""
795+
change the `base` for labeling.
796+
797+
.. warning::
798+
Should always match the base used for :class:`LogLocator`
799+
800+
"""
795801
self._base = base
796802

797803
def label_minor(self, labelOnlyBase):
@@ -803,7 +809,9 @@ def label_minor(self, labelOnlyBase):
803809
self.labelOnlyBase = labelOnlyBase
804810

805811
def __call__(self, x, pos=None):
806-
"""Return the format for tick val *x* at position *pos*"""
812+
"""
813+
Return the format for tick val `x` at position `pos`.
814+
"""
807815
vmin, vmax = self.axis.get_view_interval()
808816
d = abs(vmax - vmin)
809817
b = self._base
@@ -834,7 +842,9 @@ def format_data(self, value):
834842
return value
835843

836844
def format_data_short(self, value):
837-
'return a short formatted string representation of a number'
845+
"""
846+
Return a short formatted string representation of a number.
847+
"""
838848
return '%-12g' % value
839849

840850
def pprint_val(self, x, d):
@@ -872,7 +882,7 @@ def pprint_val(self, x, d):
872882

873883
class LogFormatterExponent(LogFormatter):
874884
"""
875-
Format values for log axis using ``exponent = log_base(value)``
885+
Format values for log axis using ``exponent = log_base(value)``.
876886
"""
877887
def __call__(self, x, pos=None):
878888
"""

0 commit comments

Comments
 (0)