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

Skip to content

Commit 1f3b2f9

Browse files
committed
DOC: Wrapped to 72 chars and fixed a couple of missed spots
1 parent c77fe94 commit 1f3b2f9

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;
@@ -788,8 +789,13 @@ def __init__(self, base=10.0, labelOnlyBase=True):
788789
self.labelOnlyBase = labelOnlyBase
789790

790791
def base(self, base):
791-
"""change the *base* for labeling - warning: should always match the
792-
base used for :class:`LogLocator`"""
792+
"""
793+
change the `base` for labeling.
794+
795+
.. warning::
796+
Should always match the base used for :class:`LogLocator`
797+
798+
"""
793799
self._base = base
794800

795801
def label_minor(self, labelOnlyBase):
@@ -801,7 +807,9 @@ def label_minor(self, labelOnlyBase):
801807
self.labelOnlyBase = labelOnlyBase
802808

803809
def __call__(self, x, pos=None):
804-
"""Return the format for tick val *x* at position *pos*"""
810+
"""
811+
Return the format for tick val `x` at position `pos`.
812+
"""
805813
vmin, vmax = self.axis.get_view_interval()
806814
d = abs(vmax - vmin)
807815
b = self._base
@@ -832,7 +840,9 @@ def format_data(self, value):
832840
return value
833841

834842
def format_data_short(self, value):
835-
'return a short formatted string representation of a number'
843+
"""
844+
Return a short formatted string representation of a number.
845+
"""
836846
return '%-12g' % value
837847

838848
def pprint_val(self, x, d):
@@ -870,7 +880,7 @@ def pprint_val(self, x, d):
870880

871881
class LogFormatterExponent(LogFormatter):
872882
"""
873-
Format values for log axis using ``exponent = log_base(value)``
883+
Format values for log axis using ``exponent = log_base(value)``.
874884
"""
875885
def __call__(self, x, pos=None):
876886
"""

0 commit comments

Comments
 (0)