Skip to content

Commit

Permalink
DOC: Wrapped to 72 chars and fixed a couple of missed spots
Browse files Browse the repository at this point in the history
  • Loading branch information
madphysicist committed Mar 31, 2016
1 parent c77fe94 commit 1f3b2f9
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Tick locating and formatting
============================
This module contains classes to support completely configurable tick locating
and formatting. Although the locators know nothing about major or minor
ticks, they are used by the Axis class to support major and minor tick
locating and formatting. Generic tick locators and formatters are provided,
as well as domain specific custom ones..
This module contains classes to support completely configurable tick
locating and formatting. Although the locators know nothing about major
or minor ticks, they are used by the Axis class to support major and
minor tick locating and formatting. Generic tick locators and
formatters are provided, as well as domain specific custom ones..
Default Formatter
Expand Down Expand Up @@ -35,8 +35,8 @@
The Locator class is the base class for all tick locators. The locators
handle autoscaling of the view limits based on the data limits, and the
choosing of tick locations. A useful semi-automatic tick locator is
MultipleLocator. You initialize this with a base, e.g., 10, and it picks axis
limits and ticks that are multiples of your base.
MultipleLocator. You initialize this with a base, e.g., 10, and it
picks axis limits and ticks that are multiples of your base.
The Locator subclasses defined here are
Expand All @@ -56,8 +56,9 @@
logarithmically ticks from min to max
:class:`SymmetricalLogLocator`
locator for use with with the symlog norm, works like the `LogLocator` for
the part outside of the threshold and add 0 if inside the limits
locator for use with with the symlog norm, works like the
`LogLocator` for the part outside of the threshold and add 0 if
inside the limits
:class:`MultipleLocator`
ticks and range are a multiple of base;
Expand Down Expand Up @@ -788,8 +789,13 @@ def __init__(self, base=10.0, labelOnlyBase=True):
self.labelOnlyBase = labelOnlyBase

def base(self, base):
"""change the *base* for labeling - warning: should always match the
base used for :class:`LogLocator`"""
"""
change the `base` for labeling.
.. warning::
Should always match the base used for :class:`LogLocator`
"""
self._base = base

def label_minor(self, labelOnlyBase):
Expand All @@ -801,7 +807,9 @@ def label_minor(self, labelOnlyBase):
self.labelOnlyBase = labelOnlyBase

def __call__(self, x, pos=None):
"""Return the format for tick val *x* at position *pos*"""
"""
Return the format for tick val `x` at position `pos`.
"""
vmin, vmax = self.axis.get_view_interval()
d = abs(vmax - vmin)
b = self._base
Expand Down Expand Up @@ -832,7 +840,9 @@ def format_data(self, value):
return value

def format_data_short(self, value):
'return a short formatted string representation of a number'
"""
Return a short formatted string representation of a number.
"""
return '%-12g' % value

def pprint_val(self, x, d):
Expand Down Expand Up @@ -870,7 +880,7 @@ def pprint_val(self, x, d):

class LogFormatterExponent(LogFormatter):
"""
Format values for log axis using ``exponent = log_base(value)``
Format values for log axis using ``exponent = log_base(value)``.
"""
def __call__(self, x, pos=None):
"""
Expand Down

0 comments on commit 1f3b2f9

Please sign in to comment.