Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/matplotlib/__pycache__/ticker.cpython-37.pyc

1085 lines
79 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
U<>]<5D>k<00>@sdZddlZddlZddlZddlZddlZddlmZddlm Z ddlm
Z e<02> e <0A>ZdZdd<08>ZGd d
<EFBFBD>d
e<11>ZGd d <0C>d e<11>ZGd d<0E>de<13>ZGdd<10>de<14>ZGdd<12>de<14>ZGdd<14>de<14>ZGdd<16>de<14>ZGdd<18>de<14>ZGdd<1A>de<14>ZGdd<1C>de<14>ZGdd<1E>de<14>ZGdd <20>d e<14>ZGd!d"<22>d"e<1D>ZGd#d$<24>d$e<1D>ZGd%d&<26>d&e<1F>Z Gd'd(<28>d(e<14>Z!Gd)d*<2A>d*e<14>Z"Gd+d,<2C>d,e<14>Z#Gd-d.<2E>d.e<13>Z$Gd/d0<64>d0e$<24>Z%Gd1d2<64>d2e$<24>Z&Gd3d4<64>d4e$<24>Z'Gd5d6<64>d6e$<24>Z(e <09>)d7<64>d8d9<64><00>Z*e <09>)d7<64>Gd:d;<3B>d;e<11><03>Z+Gd<d=<3D>d=e$<24>Z,dfd@dA<64>Z-GdBdC<64>dC<64>Z.GdDdE<64>dEe$<24>Z/e <09>)dF<64>dgdHdI<64><01>Z0e <09>)dF<64>dhdJdK<64><01>Z1dLdM<64>Z2didNdO<64>Z3dPdQ<64>Z4dRdS<64>Z5dTdU<64>Z6dVdW<64>Z7dXdY<64>Z8GdZd[<5B>d[e$<24>Z9Gd\d]<5D>d]e$<24>Z:Gd^d_<64>d_e$<24>Z;Gd`da<64>dae/<2F>Z<Gdbdc<64>dce$<24>Z=Gddde<64>dee$<24>Z>dS)ja<6A>
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.
Default Formatter
-----------------
The default formatter identifies when the x-data being plotted is a
small range on top of a large offset. To reduce the chances that the
ticklabels overlap, the ticks are labeled as deltas from a fixed offset.
For example::
ax.plot(np.arange(2000, 2010), range(10))
will have tick of 0-9 with an offset of +2e3. If this is not desired
turn off the use of the offset on the default formatter::
ax.get_xaxis().get_major_formatter().set_useOffset(False)
set the rcParam ``axes.formatter.useoffset=False`` to turn it off
globally, or set a different formatter.
Tick locating
-------------
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`. It is initialized with a base, e.g., 10, and it picks
axis limits and ticks that are multiples of that base.
The Locator subclasses defined here are
:class:`AutoLocator`
`MaxNLocator` with simple defaults. This is the default tick locator for
most plotting.
:class:`MaxNLocator`
Finds up to a max number of intervals with ticks at nice locations.
:class:`LinearLocator`
Space ticks evenly from min to max.
:class:`LogLocator`
Space ticks logarithmically from min to max.
:class:`MultipleLocator`
Ticks and range are a multiple of base; either integer or float.
:class:`FixedLocator`
Tick locations are fixed.
:class:`IndexLocator`
Locator for index plots (e.g., where ``x = range(len(y))``).
:class:`NullLocator`
No ticks.
:class:`SymmetricalLogLocator`
Locator for use with with the symlog norm; works like `LogLocator` for the
part outside of the threshold and adds 0 if inside the limits.
:class:`LogitLocator`
Locator for logit scaling.
:class:`OldAutoLocator`
Choose a `MultipleLocator` and dynamically reassign it for intelligent
ticking during navigation.
:class:`AutoMinorLocator`
Locator for minor ticks when the axis is linear and the
major ticks are uniformly spaced. Subdivides the major
tick interval into a specified number of minor intervals,
defaulting to 4 or 5 depending on the major interval.
There are a number of locators specialized for date locations - see
the `dates` module.
You can define your own locator by deriving from Locator. You must
override the ``__call__`` method, which returns a sequence of locations,
and you will probably want to override the autoscale method to set the
view limits from the data limits.
If you want to override the default locator, use one of the above or a custom
locator and pass it to the x or y axis instance. The relevant methods are::
ax.xaxis.set_major_locator(xmajor_locator)
ax.xaxis.set_minor_locator(xminor_locator)
ax.yaxis.set_major_locator(ymajor_locator)
ax.yaxis.set_minor_locator(yminor_locator)
The default minor locator is `NullLocator`, i.e., no minor ticks on by default.
Tick formatting
---------------
Tick formatting is controlled by classes derived from Formatter. The formatter
operates on a single tick value and returns a string to the axis.
:class:`NullFormatter`
No labels on the ticks.
:class:`IndexFormatter`
Set the strings from a list of labels.
:class:`FixedFormatter`
Set the strings manually for the labels.
:class:`FuncFormatter`
User defined function sets the labels.
:class:`StrMethodFormatter`
Use string `format` method.
:class:`FormatStrFormatter`
Use an old-style sprintf format string.
:class:`ScalarFormatter`
Default formatter for scalars: autopick the format string.
:class:`LogFormatter`
Formatter for log axes.
:class:`LogFormatterExponent`
Format values for log axis using ``exponent = log_base(value)``.
:class:`LogFormatterMathtext`
Format values for log axis using ``exponent = log_base(value)``
using Math text.
:class:`LogFormatterSciNotation`
Format values for log axis using scientific notation.
:class:`LogitFormatter`
Probability formatter.
:class:`EngFormatter`
Format labels in engineering notation
:class:`PercentFormatter`
Format labels as a percentage
You can derive your own formatter from the Formatter base class by
simply overriding the ``__call__`` method. The formatter class has
access to the axis view and data limits.
To control the major and minor tick label formats, use one of the
following methods::
ax.xaxis.set_major_formatter(xmajor_formatter)
ax.xaxis.set_minor_formatter(xminor_formatter)
ax.yaxis.set_major_formatter(ymajor_formatter)
ax.yaxis.set_minor_formatter(yminor_formatter)
See :doc:`/gallery/ticks_and_spines/major_minor_demo` for an
example of setting major and minor ticks. See the :mod:`matplotlib.dates`
module for more information and examples of using date locators and formatters.
<EFBFBD>N)<01>rcParams)<01>cbook)<01>
transforms)<1C>
TickHelper<EFBFBD> Formatter<65>FixedFormatter<65> NullFormatter<65> FuncFormatter<65>FormatStrFormatter<65>StrMethodFormatter<65>ScalarFormatter<65> LogFormatter<65>LogFormatterExponent<6E>LogFormatterMathtext<78>IndexFormatter<65>LogFormatterSciNotation<6F>LogitFormatter<65> EngFormatter<65>PercentFormatter<65>Locator<6F> IndexLocator<6F> FixedLocator<6F> NullLocator<6F> LinearLocator<6F>
LogLocator<EFBFBD> AutoLocator<6F>MultipleLocator<6F> MaxNLocator<6F>AutoMinorLocator<6F>SymmetricalLogLocator<6F> LogitLocatorcCsd|S)Nz\mathdefault{%s}<7D>)<01>sr!r!<00>9/tmp/pip-install-i8dhxrtk/matplotlib/matplotlib/ticker.py<70> _mathdefault<6C>sr$c@sFeZdZddd<03>Zdd<05>Zdd<07>Zdd <09>Zd
d <0B>Zd d <0A>Zdd<0F>Z dS)<12>
_DummyAxisrcCs"tj<01><02>|_tj<01><02>|_||_dS)N)<06> mtransformsZBbox<6F>unit<69>dataLim<69>viewLim<69>_minpos)<02>self<6C>minposr!r!r#<00>__init__<5F>s  z_DummyAxis.__init__cCs|jjS)N)r)<00> intervalx)r+r!r!r#<00>get_view_interval<61>sz_DummyAxis.get_view_intervalcCs||f|j_dS)N)r)r.)r+<00>vmin<69>vmaxr!r!r#<00>set_view_interval<61>sz_DummyAxis.set_view_intervalcCs|jS)N)r*)r+r!r!r#<00>
get_minpos<EFBFBD>sz_DummyAxis.get_minposcCs|jjS)N)r(r.)r+r!r!r#<00>get_data_interval<61>sz_DummyAxis.get_data_intervalcCs||f|j_dS)N)r(r.)r+r0r1r!r!r#<00>set_data_interval<61>sz_DummyAxis.set_data_intervalcCsdS)N<> r!)r+r!r!r#<00>get_tick_space<63>sz_DummyAxis.get_tick_spaceN)r)
<EFBFBD>__name__<5F>
__module__<EFBFBD> __qualname__r-r/r2r3r4r5r7r!r!r!r#r%<00>s
r%c@s8eZdZdZdd<03>Zdd<05>Zdd<07>Zdd <09>Zd
d <0B>ZdS) rNcCs
||_dS)N)<01>axis)r+r;r!r!r#<00>set_axis<69>szTickHelper.set_axiscKs|jdkrtf|<01>|_dS)N)r;r%)r+<00>kwargsr!r!r#<00>create_dummy_axis<69>s
zTickHelper.create_dummy_axiscCs|j<00>||<02>dS)N)r;r2)r+r0r1r!r!r#r2<00>szTickHelper.set_view_intervalcCs|j<00>||<02>dS)N)r;r5)r+r0r1r!r!r#r5<00>szTickHelper.set_data_intervalcCs|<00>||<02>|<00>||<02>dS)N)r2r5)r+r0r1r!r!r#<00>
set_bounds<EFBFBD>s zTickHelper.set_bounds) r8r9r:r;r<r>r2r5r?r!r!r!r#r<00>s rc@sVeZdZdZgZddd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Z d d<0E>Z
dd<10>Z dd<12>Z dS)rz=
Create a string based on a tick value and location.
NcCs td<01><01>dS)z
Return the format for tick value *x* at position pos.
``pos=None`` indicates an unspecified location.
zDerived must overrideN)<01>NotImplementedError)r+<00>x<>posr!r!r#<00>__call__<5F>szFormatter.__call__cs <00><00>|<01><00>fdd<02>t|<01>D<00>S)z1Return the tick labels for all the ticks at once.csg|]\}}<02>||<01><02>qSr!r!)<03>.0<EFBFBD>i<>value)r+r!r#<00>
<listcomp>sz*Formatter.format_ticks.<locals>.<listcomp>)<02>set_locs<63> enumerate)r+<00>valuesr!)r+r#<00> format_tickss
zFormatter.format_tickscCs
|<00>|<01>S)zl
Returns the full string representation of the value with the
position unspecified.
)rC)r+rFr!r!r#<00> format_dataszFormatter.format_datacCs
|<00>|<01>S)z|
Return a short string version of the tick value.
Defaults to the position-independent long value.
)rL)r+rFr!r!r#<00>format_data_short szFormatter.format_data_shortcCsdS)N<>r!)r+r!r!r#<00>
get_offsetszFormatter.get_offsetcCs
||_dS)N)<01>locs)r+rPr!r!r#rHszFormatter.set_locscCs|S)a{
Some classes may want to replace a hyphen for minus with the
proper unicode symbol (U+2212) for typographical correctness.
The default is to not replace it.
Note, if you use this method, e.g., in :meth:`format_data` or
call, you probably don't want to use it for
:meth:`format_data_short` since the toolbar uses this for
interactive coord reporting and I doubt we can expect GUIs
across platforms will handle the unicode correctly. So for
now the classes that override :meth:`fix_minus` should have an
explicit :meth:`format_data_short` method
r!)r+r"r!r!r#<00> fix_minusszFormatter.fix_minuscCsdS)z6Subclasses may want to override this to set a locator.Nr!)r+<00>locatorr!r!r#<00> _set_locator*szFormatter._set_locator)N) r8r9r:<00>__doc__rPrCrKrLrMrOrHrQrSr!r!r!r#r<00>s
rc@s"eZdZdZdd<03>Zddd<06>ZdS)rz<>
Format the position x to the nearest i-th label where ``i = int(x + 0.5)``.
Positions where ``i < 0`` or ``i > len(list)`` have no tick labels.
Parameters
----------
labels : list
List of labels.
cCs||_t|<01>|_dS)N)<03>labels<6C>len<65>n)r+rUr!r!r#r-9szIndexFormatter.__init__NcCs0t|d<00>}|dks||jkr"dS|j|SdS)z<>
Return the format for tick value `x` at position pos.
The position is ignored and the value is rounded to the nearest
integer, which is used to look up the label.
g<00>?rrNN)<03>intrWrU)r+rArBrEr!r!r#rC=s zIndexFormatter.__call__)N)r8r9r:rTr-rCr!r!r!r#r/s rc@seZdZdZddd<04>ZdS)rz)
Always return the empty string.
NcCsdS)z9
Returns an empty string for all inputs.
rNr!)r+rArBr!r!r#rCOszNullFormatter.__call__)N)r8r9r:rTrCr!r!r!r#rKsrc@s2eZdZdZdd<03>Zd dd<06>Zdd<08>Zd d
<EFBFBD>ZdS) rzQ
Return fixed strings for tick labels based only on position, not value.
cCs||_d|_dS)zK
Set the sequence of strings that will be used for labels.
rNN)<02>seq<65> offset_string)r+rYr!r!r#r-ZszFixedFormatter.__init__NcCs(|dks|t|j<01>krdS|j|SdS)a#
Returns the label that matches the position regardless of the
value.
For positions ``pos < len(seq)``, return `seq[i]` regardless of
`x`. Otherwise return empty string. `seq` is the sequence of
strings that this object was initialized with.
NrN)rVrY)r+rArBr!r!r#rCas zFixedFormatter.__call__cCs|jS)N)rZ)r+r!r!r#rOoszFixedFormatter.get_offsetcCs
||_dS)N)rZ)r+Zofsr!r!r#<00>set_offset_stringrsz FixedFormatter.set_offset_string)N)r8r9r:rTr-rCrOr[r!r!r!r#rVs

rc@s"eZdZdZdd<03>Zddd<06>ZdS)r z<>
Use a user-defined function for formatting.
The function should take in two inputs (a tick value ``x`` and a
position ``pos``), and return a string containing the corresponding
tick label.
cCs
||_dS)N)<01>func)r+r\r!r!r#r-~szFuncFormatter.__init__NcCs |<00>||<02>S)zq
Return the value of the user defined function.
`x` and `pos` are passed through as-is.
)r\)r+rArBr!r!r#rC<00>szFuncFormatter.__call__)N)r8r9r:rTr-rCr!r!r!r#r vsr c@s"eZdZdZdd<03>Zddd<06>ZdS)r
z<>
Use an old-style ('%' operator) format string to format the tick.
The format string should have a single variable format (%) in it.
It will be applied to the value (not the position) of the tick.
cCs
||_dS)N)<01>fmt)r+r]r!r!r#r-<00>szFormatStrFormatter.__init__NcCs
|j|S)zw
Return the formatted label string.
Only the value `x` is formatted. The position is ignored.
)r])r+rArBr!r!r#rC<00>szFormatStrFormatter.__call__)N)r8r9r:rTr-rCr!r!r!r#r
<00>sr
c@s"eZdZdZdd<03>Zddd<06>ZdS)r z<>
Use a new-style format string (as used by `str.format()`)
to format the tick.
The field used for the value must be labeled `x` and the field used
for the position must be labeled `pos`.
cCs
||_dS)N)r])r+r]r!r!r#r-<00>szStrMethodFormatter.__init__NcCs|jj||d<01>S)z<>
Return the formatted label string.
`x` and `pos` are passed to `str.format` as keyword arguments
with those exact names.
)rArB)r]<00>format)r+rArBr!r!r#rC<00>szStrMethodFormatter.__call__)N)r8r9r:rTr-rCr!r!r!r#r <00>sr c@s,eZdZdZddd<04>Ze<05>d<05>dd<07><00>ZdS) <09>OldScalarFormatterz.
Tick location is a plain old number.
Nc Cs<>|j<00><01>\}}t|<01>dkr.|t|<01>kr.d|St||<00>}|dkrFdn&|dkrRdn|dkr^dn|d krjd
nd }||}|<07>d <0C>}t|<08>d kr<>|d<00>d<0F><01>d<10>} |dd<00>dd<12>}
|ddd<13><00>d<0F>} d| |
| f}n|<07>d<0F><01>d<10>}|S)z|
Return the format for tick val `x` based on the width of the axis.
The position `pos` is ignored.
g<00><>@z%dg{<14>G<EFBFBD>z<EFBFBD>?z%1.3e<EFBFBD>z%1.3f<EFBFBD>
z%1.2fgj<>@z%1.1fz%1.1e<EFBFBD>e<>r<00>0<>.<2E>+rNNz%se%s%s) r;r/<00>absrX<00>splitrV<00>rstrip<69>replace<63>lstrip) r+rArBZxmin<69>xmax<61>dr]r"<00>tup<75>mantissa<73>sign<67>exponentr!r!r#rC<00>s$     
 zOldScalarFormatter.__call__z3.1c Cs<>t|<01>dkr |t|<01>kr d|S|dkr.d}n<|dkr<d}n.|dkrJd}n |d krXd
}n|d krfd }nd}||}|<04>d <0A>}t|<05>dkr<>|d<00>d<10><01>d<11>}|d d<00>dd<13>}|d d d<14><00>d<10>}d|||f}n|<04>d<10><01>d<11>}|S)zP
Formats the value `x` based on the size of the axis range `d`.
g<00><>@z%dg{<14>G<EFBFBD>z<EFBFBD>?z%1.3eg<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?z%1.3fgj<>@z%1.1eraz%1.1fr`z%1.2frbrcrrdrerfrNNz%se%s%s)rgrXrhrVrirjrk) r+rArmr]r"rnrorprqr!r!r#<00>
pprint_val<EFBFBD>s,
 zOldScalarFormatter.pprint_val)N)r8r9r:rTrCr<00>
deprecatedrrr!r!r!r#r_<00>s
r_c@s<>eZdZdZd-dd<04>Zdd<06>Zdd<08>Zeeed <09>Zd
d <0B>Z d d <0A>Z
ee e
d <09>Z dd<0F>Z dd<11>Z ee e d <09>Zdd<13>Zd.dd<15>Zdd<17>Zdd<19>Zdd<1B>Zdd<1D>Zdd<1F>Zd d!<21>Zd"d#<23>Zd$d%<25>Zd&d'<27>Ze<1A>d(<28>d)d*<2A><00>Zd+d,<2C>ZdS)/r a
Format tick values as a number.
Tick value is interpreted as a plain old number. If
``useOffset==True`` and the data range is much smaller than the data
average, then an offset will be determined such that the tick labels
are meaningful. Scientific notation is used for ``data < 10^-n`` or
``data >= 10^m``, where ``n`` and ``m`` are the power limits set
using ``set_powerlimits((n,m))``. The defaults for these are
controlled by the ``axes.formatter.limits`` rc parameter.
NcCs~|dkrtd}td|_|<00>|<01>td|_|dkr>td}|<00>|<02>d|_d|_d|_td|_|dkrttd }||_ dS)
Nzaxes.formatter.useoffsetzaxes.formatter.offset_thresholdz text.usetexzaxes.formatter.use_mathtextrrNTzaxes.formatter.limitszaxes.formatter.use_locale)
r<00>_offset_threshold<6C> set_useOffset<65>_usetex<65>set_useMathText<78>orderOfMagnituder^<00> _scientific<69> _powerlimits<74>
_useLocale)r+<00> useOffset<65> useMathText<78> useLocaler!r!r#r-<00>s




zScalarFormatter.__init__cCs|jS)N)<01>
_useOffset)r+r!r!r#<00> get_useOffsetszScalarFormatter.get_useOffsetcCs&|dkrd|_||_n d|_||_dS)N)TFrF)<02>offsetr)r+<00>valr!r!r#rus
zScalarFormatter.set_useOffset)<02>fget<65>fsetcCs|jS)N)r{)r+r!r!r#<00> get_useLocale!szScalarFormatter.get_useLocalecCs|dkrtd|_n||_dS)Nzaxes.formatter.use_locale)rr{)r+r<>r!r!r#<00> set_useLocale$s zScalarFormatter.set_useLocalecCs|jS)N)<01> _useMathText)r+r!r!r#<00>get_useMathText,szScalarFormatter.get_useMathTextcCs|dkrtd|_n||_dS)Nzaxes.formatter.use_mathtext)rr<>)r+r<>r!r!r#rw/s zScalarFormatter.set_useMathTextcCs$tdstds|S|<01>dd<04>SdS)z7
Replace hyphens with a unicode minus.
z text.usetexzaxes.unicode_minus<75>-uN)rrj)r+r"r!r!r#rQ7szScalarFormatter.fix_minuscCsht|j<01>dkrdS||jd|j}t<04>|<03>dkr8d}|jrPt<07>|j |f<01>}n
|j |}|<00>
|<04>SdS)zI
Return the format for tick value `x` at position `pos`.
rrNg$@g:<3A>0<EFBFBD><30>yE>N) rVrPr<>rx<00>nprgr{<00>locale<6C> format_stringr^rQ)r+rArB<00>xpr"r!r!r#rC@s
zScalarFormatter.__call__cCst|<01>|_dS)z<>
Turn scientific notation on or off.
See Also
--------
ScalarFormatter.set_powerlimits
N)<02>boolry)r+<00>br!r!r#<00>set_scientificPszScalarFormatter.set_scientificcCst|<01>dkrtd<02><01>||_dS)am
Sets size thresholds for scientific notation.
Parameters
----------
lims : (min_exp, max_exp)
A tuple containing the powers of 10 that determine the switchover
threshold. Numbers below ``10**min_exp`` and above ``10**max_exp``
will be displayed in scientific notation.
For example, ``formatter.set_powerlimits((-3, 4))`` sets the
pre-2007 default in which scientific notation is used for
numbers less than 1e-3 or greater than 1e4.
See Also
--------
ScalarFormatter.set_scientific
rcz%'lims' must be a sequence of length 2N)rV<00>
ValueErrorrz)r+Zlimsr!r!r#<00>set_powerlimitsZs zScalarFormatter.set_powerlimitscCs |jrt<01>d|f<01>Sd|SdS)zM
Return a short formatted string representation of a number.
z%-12gN)r{r<>r<>)r+rFr!r!r#rMqsz!ScalarFormatter.format_data_shortcCs2|jrt<01>d|f<01>}nd|}|<00>|<02>}|<00>|<02>S)zG
Return a formatted string representation of a number.
z%1.10e)r{r<>r<><00>_formatSciNotationrQ)r+rFr"r!r!r#rLzs

zScalarFormatter.format_datacCs<>t|j<01>dkrdSd}|js"|jr<>d}d}|jrN|<00>|j<03>}|jdkrNd|}|jr||js`|jrr|<00>d|j<00>}n
d|j}|jr<>|dkr<>dt|<03>}d<02>d|t|<02>df<04>}n8|jr<>|dkr<>d|}d<02>d||df<04>}nd<02>||f<02>}|<00> |<01>S)z:
Return scientific notation, plus offset.
rrNrfraz1e%dz\times%s<>$)
rVrPrxr<>rLrvr<>r$<00>joinrQ)r+r"Z offsetStrZ sciNotStrr!r!r#rO<00>s0  
 
 zScalarFormatter.get_offsetcCs6||_t|j<00>dkr2|jr"|<00><03>|<00><04>|<00><05>dS)z1
Set the locations of the ticks.
rN)rPrVr<00>_compute_offset<65>_set_order_of_magnitude<64> _set_format)r+rPr!r!r#rH<00>s zScalarFormatter.set_locsc
s`|j}t|j<02><03><00>\}}t<04>|<01>}|||k||k@}t|<01>sHd|_dS|<01><08>|<01> <09>}}||ksz|dkrv|kr<>nn
d|_dStt
t |<04><01>t
t |<05><01>g<02>\<02><01>t <0C> d|<04>}t<04>t <0C><0F><00><01>}dt<10><00>fdd<04>t<11>|d<05>D<00><01>}<08><00>d|dk<01>rdt<10><00>fdd<04>t<11>|d<05>D<00><01>}|jd} <09>d|d| k<05>rV|<06>d|d|nd|_dS) Nrr`c3s*|]"}<01>d|<00>d|kr|VqdS)raNr!)rD<00>oom)<02>abs_max<61>abs_minr!r#<00> <genexpr><3E>sz2ScalarFormatter._compute_offset.<locals>.<genexpr><3E><><EFBFBD><EFBFBD><EFBFBD>rag{<14>G<EFBFBD>z<EFBFBD>?c3s.|]&}<01>d|<00>d|dkr|VqdS)rar`Nr!)rDr<>)r<>r<>r!r#r<><00>s)rP<00>sortedr;r/r<><00>asarrayrVr<><00>min<69>maxrg<00>float<61>math<74>copysign<67>ceil<69>log10<31>next<78> itertools<6C>countrt)
r+rPr0r1ZlminZlmaxrpZoom_maxr<78>rWr!)r<>r<>r#r<><00>s(
   $$
.zScalarFormatter._compute_offsetcCs(|jsd|_dS|jd|jdkr0dkrDnn|jd|_dSt|j<04><05><00>\}}t<06>|j<08>}|||k||k@}t<06> |<03>}t
|<03>s<>d|_dS|j r<>t <0C> t <0C>||<00><01>}n@|d|dkr<>|d}n|d}|dkr<>d}nt <0C> t <0C>|<05><01>}||jdk<01>r||_n||jdk<05>r||_nd|_dS)Nrr`r<>)ryrxrzr<>r;r/r<>r<>rPrgrVr<>r<><00>floorr<72>)r+r0r1rPr<>r<>r!r!r#r<><00>s4$  

z'ScalarFormatter._set_order_of_magnitudecCs<t|j<01>dkr |j|j<02><03><00>}n|j}t<04>|<01>|jd|j}t<04>|<02>}|dkrbt<04> t<04>
|<02><01>}|dkrnd}t|j<01>dkr<>|dd<05>}t t <0C> t <0C>|<03><01><01>}t dd|<00>}dd|}x8|dkr<>t<04>
|tj||d <09><00><01> <09>|kr<>|d8}q<>Pq<>W|d7}d
t|<05>d |_|j<12>r d |j|_n|j<13>r8d t|j<11>|_dS) Nrcg$@rr`<00><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>g<><67><EFBFBD><EFBFBD>MbP?ra)<01>decimalsz%1.<2E>fz$%s$)rVrPr;r/r<>r<>r<>rxZptpr<70>rgrXr<>r<>r<><00>round<6E>strr^rvr<>r$)r+Z_locsrPZ loc_rangeZ loc_range_oomZsigfigsZthreshr!r!r#r<><00>s0
  
 
zScalarFormatter._set_formatz3.1cCsJ||jd|j}t<02>|<02>dkr&d}|jr<t<05>|j|f<01>S|j|SdS)Ng$@g:<3A>0<EFBFBD><30>yE>r)r<>rxr<>rgr{r<>r<>r^)r+rAr<>r!r!r#rrs zScalarFormatter.pprint_valcCs<>|jr t<01><02>d}t<01><02>d}nd}d}|<01>d<05>}y<>|d<00>d<07><01>|<02>}|dd<00>|d <09>}|ddd<00><00>d<07>}|js~|jr<>|d
kr<>|d kr<>d }|r<>d ||f}|r<>|r<>d ||fSd ||fSnd|||f<00>d<05>}|SWnt k
r<EFBFBD>|SXdS)N<> decimal_point<6E> positive_signrerfrbrrdr`rN<00>1z 10^{%s%s}z %s{\times}%sz%s%sz%se%s%s)
r{r<><00>
localeconvrhrirjrkr<>rv<00>
IndexError)r+r"r<>r<>rnZ significandrprqr!r!r#r<>)s, 
   z"ScalarFormatter._formatSciNotation)NNN)N)r8r9r:rTr-r<>ru<00>propertyr|r<>r<>r~r<>rwr}rQrCr<>r<>rMrLrOrHr<>r<>r<>rrsrrr<>r!r!r!r#r <00>s0 
   

    '%#
r c@speZdZdZddd<06>Zdd<08>Zd d
<EFBFBD>Zdd d <0C>Zd d<0E>Zddd<10>Z dd<12>Z
dd<14>Z e <0C> d<15>dd<17><00>Zdd<19>ZdS)r a
Base class for formatting ticks on a log or symlog scale.
It may be instantiated directly, or subclassed.
Parameters
----------
base : float, optional, default: 10.
Base of the logarithm used in all calculations.
labelOnlyBase : bool, optional, default: False
If True, label ticks only at integer powers of base.
This is normally True for major ticks and False for
minor ticks.
minor_thresholds : (subset, all), optional, default: (1, 0.4)
If labelOnlyBase is False, these two numbers control
the labeling of ticks that are not at integer powers of
base; normally these are the minor ticks. The controlling
parameter is the log of the axis data range. In the typical
case where base is 10 it is the number of decades spanned
by the axis, so we can call it 'numdec'. If ``numdec <= all``,
all minor ticks will be labeled. If ``all < numdec <= subset``,
then only a subset of minor ticks will be labeled, so as to
avoid crowding. If ``numdec > subset`` then no minor ticks will
be labeled.
linthresh : None or float, optional, default: None
If a symmetric log scale is in use, its ``linthresh``
parameter must be supplied here.
Notes
-----
The `set_locs` method must be called to enable the subsetting
logic controlled by the ``minor_thresholds`` parameter.
In some cases such as the colorbar, there is no distinction between
major and minor ticks; the tick locations might be set manually,
or by a locator that puts ticks at integer powers of base and
at intermediate locations. For this situation, disable the
minor_thresholds logic by using ``minor_thresholds=(np.inf, np.inf)``,
so that all ticks will be labeled.
To disable labeling of minor ticks when 'labelOnlyBase' is False,
use ``minor_thresholds=(0, 0)``. This is the default for the
"classic" style.
Examples
--------
To label a subset of minor ticks when the view limits span up
to 2 decades, and all of the ticks when zoomed in to 0.5 decades
or less, use ``minor_thresholds=(2, 0.5)``.
To label all minor ticks when the view limits span up to 1.5
decades, use ``minor_thresholds=(1.5, 1.5)``.
<20>$@FNcCs@t|<01>|_||_|dkr*tdr&d}nd}||_d|_||_dS)Nz_internal.classic_mode)rr)r`g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)r<><00>_base<73> labelOnlyBaser<00>minor_thresholds<64>
_sublabels<EFBFBD>
_linthresh)r+<00>baser<65>r<><00> linthreshr!r!r#r-<00>s
zLogFormatter.__init__cCs
||_dS)z<>
Change the *base* for labeling.
.. warning::
Should always match the base used for :class:`LogLocator`
N)r<>)r+r<>r!r!r#r<><00>szLogFormatter.basecCs
||_dS)z<>
Switch minor tick labeling on or off.
Parameters
----------
labelOnlyBase : bool
If True, label ticks only at integer powers of base.
N)r<>)r+r<>r!r!r#<00> label_minor<6F>s
zLogFormatter.label_minorc
Cs<>t<00>|jd<00>rd|_dS|j}|dkrNy|j<05><06>j}Wntk
rLYnX|j<05> <09>\}}||krn||}}|dkr<>|dkr<>dh|_dS|j
}|dk <09>rd}|| kr<>t || <00>}|t <0C> ||<00>t <0C> |<05>7}||k<04>r6t||<02>}|t <0C> ||<00>t <0C> |<05>7}n4t <0C> |<03>t <0C> |<05>}t <0C> |<04>t <0C> |<05>}t||<00>}||jdk<04>rPdh|_nV||jdk<04>r<>tjddt|<05>dd|d<05>} tt<00>| <09><01>|_ntt<00>d|d<00><02>|_dS)z<>
Use axis view limits to control which ticks are labeled.
The *locs* parameter is ignored in the present algorithm.
rNr`rc)r<>)r<><00>isinfr<66>r<>r<>r;Z get_transformr<6D><00>AttributeErrorr/r<>r<>r<><00>logr<67>rgZlogspacerX<00>setr<74><00>arange)
r+rPr<>r0r1r<><00>numdec<65>rhs<68>lhs<68>cr!r!r#rH<00>sB


 

 
zLogFormatter.set_locscCs8|dkrd|}n"|dkr$d|}n|<00>|||<00>}|S)Ni'z%1.0er`)<01> _pprint_val)r+rAr0r1r"r!r!r#<00>_num_to_string<6E>s 

zLogFormatter._num_to_stringc Cs<>|dkr dSt|<01>}|j}t<02>|<01>t<02>|<03>}t|<04>}|rDt<05>|<04>nt<05>|<04>}t<05>|||<00>}|jrn|sndS|j dk r<>||j kr<>dS|j
<EFBFBD> <0B>\}} t j || dd<06>\}} |<00>||| <09>}
|<00>|
<EFBFBD>S)z5
Return the format for tick val *x*.
grdrNNg<4E><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)<01>expander)rgr<>r<>r<><00>is_close_to_intr<74>r<>r<>r<>r<>r;r/r&<00> nonsingularr<72>rQ) r+rArBr<><00>fx<66> is_x_decaderq<00>coeffr0r1r"r!r!r#rC<00>s 
zLogFormatter.__call__cCs&|j}d|_t<01>|<00>|<01><01>}||_|S)NF)r<>rZ
strip_mathrC)r+rFr<>r!r!r#rLs
zLogFormatter.format_datacCsd|S)zM
Return a short formatted string representation of a number.
z%-12gr!)r+rFr!r!r#rM szLogFormatter.format_data_shortz3.1cOs |j||<02>S)N)r<>)r+<00>argsr=r!r!r#rrszLogFormatter.pprint_valcCs<>t|<01>dkr |t|<01>kr d|S|dkr,dn&|dkr8dn|dkrDdn|d krPd
nd }||}|<04>d <0C>}t|<05>d kr<>|d<00>d<0F><01>d<10>}t|d<00>}|r<>d||f}q<>|}n|<04>d<0F><01>d<10>}|S)Ng<00><>@z%dg{<14>G<EFBFBD>z<EFBFBD>?z%1.3er`z%1.3fraz%1.2fgj<>@z%1.1fz%1.1erbrcrrdrez%se%d)rgrXrhrVri)r+rArmr]r"rnrorqr!r!r#r<>s"    
  zLogFormatter._pprint_val)r<>FNN)N)N)r8r9r:rTr-r<>r<>rHr<>rCrLrMrrsrrr<>r!r!r!r#r Gs9


<
r c@seZdZdZdd<03>ZdS)rzJ
Format values for log axis using ``exponent = log_base(value)``.
cCslt<00>|<01>t<00>|j<02>}t|<04>dkr,d|}n<t|<04>dkrBd|}n&t<00>||<00>t<00>|j<02>}|<00>||<06>}|S)Ni'z%1.0gr`)r<>r<>r<>rgr<>)r+rAr0r1r<>r"<00>fdr!r!r#r<>0s 
 
 z#LogFormatterExponent._num_to_stringN)r8r9r:rTr<>r!r!r!r#r,src@s"eZdZdZdd<03>Zddd<06>ZdS)rzJ
Format values for log axis using ``exponent = log_base(value)``.
cCs,|rd|||fSdtd|||f<00>SdS)z&Return string for non-decade locationsz $%s%s^{%.2f}$z$%s$z %s%s^{%.2f}N)r$)r+<00> sign_stringr<67>r<><00>usetexr!r!r#<00>_non_decade_formatAsz'LogFormatterMathtext._non_decade_formatNc Cs^td}td}|dkr,|r dSdtd<06>S|dkr8dnd}t|<01>}|j}t<04>|<01>t<04>|<06>}t|<07>}|rtt<07>|<07>nt<07> |<07>} t<07>||| <00>}
|r<>t|<07>}|j
r<EFBFBD>|s<>dS|j d k r<>|
|j kr<>dS|d
d kr<>d |} nd |} t<07>|<07>|k<00>r|<03>rd<0E> ||<01>Sd<0F> td<10> ||<01><02><01>Sn@|<08>s0|<00> || ||<03>S|<03>rDd|| |fSdtd|| |f<00>Sd S)z_
Return the format for tick value *x*.
The position *pos* is ignored.
z text.usetexzaxes.formatter.min_exponentrz$0$z$%s$rdr<>rNNr`gz%dz%sz
${0}{1:g}$z${0}$z{0}{1:g}z $%s%s^{%d}$z %s%s^{%d})rr$rgr<>r<>r<>r<>r<>r<>r<>r<>r<>r^r<>) r+rArBr<><00>min_expr<70>r<>r<>r<>rqr<>r<>r!r!r#rCIs@ 
 
 zLogFormatterMathtext.__call__)N)r8r9r:rTr<>rCr!r!r!r#r<src@seZdZdZdd<03>ZdS)rzL
Format values following scientific notation in a logarithmic axis.
cCsbt|<02>}t<01>|<03>}||||}t|<07>r2t|<07>}|rFd||||fSdtd||||f<00>SdS)z&Return string for non-decade locationsz$%s%g\times%s^{%d}$z$%s$z%s%g\times%s^{%d}N)r<>r<>r<>r<>r<>r$)r+r<>r<>r<>r<>r<>rqr<>r!r!r#r<><00>s
z*LogFormatterSciNotation._non_decade_formatN)r8r9r:rTr<>r!r!r!r#r}src@s"eZdZdZddd<04>Zdd<06>ZdS)rz2
Probability formatter (using Math text).
NcCs<>d}d|krdkr(nn d<04>|<01>}n^|dkrVt|<01>rJd<05>t<02>|<01><01>}q<>d<06>|<01>}n0td|<00>rxd<08>t<02>d|<00><01>}nd <09>d|<00>}|S)
NrNg{<14>G<EFBFBD>z<EFBFBD>?g<>G<EFBFBD>z<14><>?z{:.2f}z$10^{{{:.0f}}}$z${:.5f}$r`z$1-10^{{{:.0f}}}$z
$1-{:.5f}$)r^<00> is_decader<65>r<>)r+rArBr"r!r!r#rC<00>s   zLogitFormatter.__call__cCsd|S)z:return a short formatted string representation of a numberz%-12gr!)r+rFr!r!r#rM<00>sz LogitFormatter.format_data_short)N)r8r9r:rTrCrMr!r!r!r#r<00>s
rc@s<>eZdZdZdddddddd d
d d d dddddd<13>Zd(ddd<16>dd<18>Zdd<1A>Zdd<1C>Zeeed<1D>Z dd<1F>Z
d d!<21>Z ee
e d<1D>Z d"d#<23>Z d)d$d%<25>Zd&d'<27>ZdS)*rz<>
Formats axis values using engineering prefixes to represent powers
of 1000, plus a specified unit, e.g., 10 MHz instead of 1e7.
<20>y<>z<>ar<61><00>prW<00>µ<>mrN<00>k<>M<>G<>T<>P<>E<>Z<>Y)i<><69><EFBFBD><EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD>i<EFBFBD><69><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>rr<><00>r6<00> <00><00><00><00>N<> )r<>r}cCs*||_||_||_|<00>|<04>|<00>|<05>dS)a<>
Parameters
----------
unit : str (default: "")
Unit symbol to use, suitable for use with single-letter
representations of powers of 1000. For example, 'Hz' or 'm'.
places : int (default: None)
Precision with which to display the number, specified in
digits after the decimal point (there will be between one
and three digits before the decimal point). If it is None,
the formatting falls back to the floating point format '%g',
which displays up to 6 *significant* digits, i.e. the equivalent
value for *places* varies between 0 and 5 (inclusive).
sep : str (default: " ")
Separator used between the value and the prefix/unit. For
example, one get '3.14 mV' if ``sep`` is " " (default) and
'3.14mV' if ``sep`` is "". Besides the default behavior, some
other useful options may be:
* ``sep=""`` to append directly the prefix/unit to the value;
* ``sep="\N{THIN SPACE}"`` (``U+2009``);
* ``sep="\N{NARROW NO-BREAK SPACE}"`` (``U+202F``);
* ``sep="\N{NO-BREAK SPACE}"`` (``U+00A0``).
usetex : bool (default: None)
To enable/disable the use of TeX's math mode for rendering the
numbers in the formatter.
useMathText : bool (default: None)
To enable/disable the use mathtext for rendering the numbers in
the formatter.
N)r'<00>places<65>sep<65>
set_usetexrw)r+r'r<>r<>r<>r}r!r!r#r-<00>s
$
zEngFormatter.__init__cCs|jS)N)rv)r+r!r!r#<00>
get_usetex<EFBFBD>szEngFormatter.get_usetexcCs|dkrtd|_n||_dS)Nz text.usetex)rrv)r+r<>r!r!r#r<><00>s zEngFormatter.set_usetex)r<>r<>cCs|jS)N)r<>)r+r!r!r#r<><00>szEngFormatter.get_useMathTextcCs|dkrtd|_n||_dS)Nzaxes.formatter.use_mathtext)rr<>)r+r<>r!r!r#rw<00>s zEngFormatter.set_useMathTextcCs t<00>||<01>S)z7
Replace hyphens with a unicode minus.
)r rQ)r+r"r!r!r#rQszEngFormatter.fix_minuscCsDd|<00>|<01>|jf}|jr:|<03>|j<02>r:|dt|j<02> <00>}|<00>|<03>S)Nz%s%s)<06>
format_engr'r<><00>endswithrVrQ)r+rArBr"r!r!r#rC szEngFormatter.__call__cCsd}|jdkrdn
d<04>|j<00>}|dkr0d}| }|dkrVtt<03>t<03>|<01>d<00>d<00>}nd}d}t<06>|t|j <09>t
|j <09><01>}||d |}t t t||<03><02><01>d
kr<>|t
|j <09>kr<>|d
}|d7}|j t|<04>}|j s<>|jr<>d j||j||d <0C>}nd j||j||d <0C>}|S)ux
Formats a number in engineering notation, appending a letter
representing the power of 1000 of the original number.
Some examples:
>>> format_eng(0) # for self.places = 0
'0'
>>> format_eng(1000000) # for self.places = 1
'1.0 M'
>>> format_eng("-1e-6") # for self.places = 2
'-1.00 µ'
r`N<>gz.{:d}frr<>r<>gg$@i<>z${mant:{fmt}}${sep}{prefix})<04>mantr<74><00>prefixr]z{mant:{fmt}}{sep}{prefix})r<>r^rXr<>r<>r<>r<><00>clipr<70><00> ENG_PREFIXESr<53>rgr<>rvr<>r<>)r+<00>numrpr]Zpow10r<30>r<><00> formattedr!r!r#r<>s, zEngFormatter.format_eng)rNNr<4E>)N)r8r9r:rTr<>r-r<>r<>r<>r<>r<>rwr}rQrCr<>r!r!r!r#r<00>s:)  
rc@sNeZdZdZddd<07>Zddd <09>Zd
d <0B>Zd d <0A>Zedd<0F><00>Z e j
dd<0F><00>Z dS)ra<>
Format numbers as a percentage.
Parameters
----------
xmax : float
Determines how the number is converted into a percentage.
*xmax* is the data value that corresponds to 100%.
Percentages are computed as ``x / xmax * 100``. So if the data is
already scaled to be percentages, *xmax* will be 100. Another common
situation is where `xmax` is 1.0.
decimals : None or int
The number of decimal places to place after the point.
If *None* (the default), the number will be computed automatically.
symbol : string or None
A string that will be appended to the label. It may be
*None* or empty to indicate that no symbol should be used. LaTeX
special characters are escaped in *symbol* whenever latex mode is
enabled, unless *is_latex* is *True*.
is_latex : bool
If *False*, reserved LaTeX characters in *symbol* will be escaped.
<20>dN<>%FcCs |d|_||_||_||_dS)Ng)rlr<><00>_symbol<6F> _is_latex)r+rlr<><00>symbolZis_latexr!r!r#r-as
zPercentFormatter.__init__cCs,|j<00><01>\}}t||<00>}|<00>|<00>||<05><02>S)zP
Formats the tick as a percentage with the appropriate scaling.
)r;r/rgrQ<00>
format_pct)r+rArBZax_minZax_max<61> display_ranger!r!r#rCgs zPercentFormatter.__call__cCs<>|<00>|<01>}|jdkr`|<00>|<02>}|dkr,d}qft<02>dt<02>d|<00><00>}|dkrRd}qf|dkrfd}n|j}dj|t|<04>d<06>}||jS)a<>
Formats the number as a percentage number with the correct
number of decimals and adds the percent symbol, if any.
If `self.decimals` is `None`, the number of digits after the
decimal point is set based on the `display_range` of the axis
as follows:
+---------------+----------+------------------------+
| display_range | decimals | sample |
+---------------+----------+------------------------+
| >50 | 0 | ``x = 34.5`` => 35% |
+---------------+----------+------------------------+
| >5 | 1 | ``x = 34.5`` => 34.5% |
+---------------+----------+------------------------+
| >0.5 | 2 | ``x = 34.5`` => 34.50% |
+---------------+----------+------------------------+
| ... | ... | ... |
+---------------+----------+------------------------+
This method will not be very good for tiny axis ranges or
extremely large ones. It assumes that the values on the chart
are percentages displayed on a reasonable scale.
Nrg@<40>z{x:0.{decimals}f})rAr<>)<08>convert_to_pctr<74>r<>r<>r<>r^rXr<>)r+rArZ scaled_ranger<65>r"r!r!r#rps


zPercentFormatter.format_pctcCsd||jS)NgY@)rl)r+rAr!r!r#r<00>szPercentFormatter.convert_to_pctcCs@|j}|sd}n,tdr<|js<xdD]}|<01>|d|<00>}q$W|S)z<>
The configured percent symbol as a string.
If LaTeX is enabled via :rc:`text.usetex`, the special characters
``{'#', '$', '%', '&', '~', '_', '^', '\', '{', '}'}`` are
automatically escaped in the string.
rNz text.usetexz
\#$%&~_^{}<7D>\)r<>rr<>rj)r+r<><00>specr!r!r#r<><00>s 
zPercentFormatter.symbolcCs
||_dS)N)r<>)r+r<>r!r!r#r<><00>s)r<>Nr<4E>F)N) r8r9r:rTr-rCrrr<>r<><00>setterr!r!r!r#rGs

/ rc@sdeZdZdZdZdd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Z d d<0E>Z
dd<10>Z dd<12>Z dd<14>Z dd<16>ZdS)rz<>
Determine the tick locations;
Note that the same locator should not be used across multiple
`~matplotlib.axis.Axis` because the locator stores references to the Axis
data and view limits.
i<>cCs td<01><01>dS)a<>
Return the values of the located ticks given **vmin** and **vmax**.
.. note::
To get tick locations with the vmin and vmax values defined
automatically for the associated :attr:`axis` simply call
the Locator instance::
>>> print(type(loc))
<type 'Locator'>
>>> print(loc())
[1, 2, 3, 4]
zDerived must overrideN)r@)r+r0r1r!r!r#<00> tick_values<65>szLocator.tick_valuescKst<00>dtt|<00><01><00>dS)z<>
Do nothing, and raise a warning. Any locator class not supporting the
set_params() function will call this.
z/'set_params()' not defined for locator of type N)r<00>_warn_externalr<6C><00>type)r+r=r!r!r#<00>
set_params<EFBFBD>szLocator.set_paramscCs td<01><01>dS)z!Return the locations of the tickszDerived must overrideN)r@)r+r!r!r#rC<00>szLocator.__call__cCs0t|<01>|jkr,td<01>t|<01>|d|d<00><03><01>|S)zUraise a RuntimeError if Locator attempts to create more than
MAXTICKS locszOLocator attempting to generate {} ticks from {} to {}: exceeds Locator.MAXTICKSrr<>)rV<00>MAXTICKS<4B> RuntimeErrorr^)r+rPr!r!r#<00>raise_if_exceeds<64>szLocator.raise_if_exceedscCstj||dd<02>S)z0Expand a range as needed to avoid singularities.g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)r<>)r&r<>)r+Zv0Zv1r!r!r#r<><00>szLocator.nonsingularcCs t<00>||<02>S)z<>
Select a scale for the range from vmin to vmax.
Subclasses should override this method to change locator behaviour.
)r&r<>)r+r0r1r!r!r#<00> view_limits<74>szLocator.view_limitscCs|j|j<01><02><00>S)zautoscale the view limits)rr;r/)r+r!r!r#<00> autoscale<6C>szLocator.autoscalecCs<>|<00>}t|<02>}|j<01><02>\}}tj||dd<02>\}}|dkrR|t|d|d<00>}nt||<00>}||d}||7}||7}|jj||dd<08>d S)
z*Pan numticks (can be positive or negative)g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)r<>rcrr`g@T)<01>ignoreN)rVr;r/r&r<>rgr2)r+Znumsteps<70>ticks<6B>numticksr0r1<00>steprmr!r!r#<00>pans  z Locator.pancCsX|j<00><01>\}}tj||dd<02>\}}t||<00>}d||}|jj||||dd<05>dS)z>Zoom in/out on axis; if direction is >0 zoom in, else zoom outg<74><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)r<>g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?T)rN)r;r/r&r<>rgr2)r+<00> directionr0r1<00>intervalrr!r!r#<00>zooms
  z Locator.zoomcCsdS)z1refresh internal information based on current limNr!)r+r!r!r#<00>refreshszLocator.refreshN)r8r9r:rTr rr
rCr r<>rrrrrr!r!r!r#r<00>s   rc@s2eZdZdZdd<03>Zd dd<06>Zdd<08>Zd d
<EFBFBD>ZdS) rz<>
Place a tick on every multiple of some base number of points
plotted, e.g., on every 5th point. It is assumed that you are doing
index plotting; i.e., the axis is 0, len(data). This is mainly
useful for x ticks.
cCs||_||_dS)z<place ticks on the i-th data points where (i-offset)%base==0N)r<>r<>)r+r<>r<>r!r!r#r-)szIndexLocator.__init__NcCs |dk r||_|dk r||_dS)z"Set parameters within this locatorN)r<>r<>)r+r<>r<>r!r!r#r
.szIndexLocator.set_paramscCs|j<00><01>\}}|<00>||<02>S)z!Return the locations of the ticks)r;r4r)r+<00>dmin<69>dmaxr!r!r#rC5szIndexLocator.__call__cCs |<00>t<01>||j|d|j<04><03>S)Nr`)r r<>r<>r<>r<>)r+r0r1r!r!r#r:szIndexLocator.tick_values)NN)r8r9r:rTr-r
rCrr!r!r!r#r"s

rc@s4eZdZdZd dd<04>Zd dd<06>Zdd<08>Zd d
<EFBFBD>ZdS) ran
Tick locations are fixed. If nbins is not None,
the array of possible positions will be subsampled to
keep the number of ticks <= nbins +1.
The subsampling will be done so as to include the smallest
absolute value; for example, if zero is included in the
array of possibilities, then it is guaranteed to be one of
the chosen ticks.
NcCs(t<00>|<01>|_|dk rt|d<01>nd|_dS)Nrc)r<>r<>rPr<><00>nbins)r+rPrr!r!r#r-Js zFixedLocator.__init__cCs|dk r||_dS)z#Set parameters within this locator.N)r)r+rr!r!r#r
NszFixedLocator.set_paramscCs |<00>dd<00>S)N)r)r+r!r!r#rCSszFixedLocator.__call__cCs<>|jdkr|jSttt<04>t|j<01>|j<00><01>d<02>}|jdd|<03>}xBtd|<03>D]4}|j|d|<03>}t<04>|<06><01> <09>t<04>|<04><01> <09>krL|}qLW|<00>
|<04>S)z<>"
Return the locations of the ticks.
.. note::
Because the values are fixed, vmin and vmax are not used in this
method.
Nr`) rrPr<>rXr<>r<>rV<00>rangergr<>r )r+r0r1rrrEZticks1r!r!r#rVs
 zFixedLocator.tick_values)N)N)r8r9r:rTr-r
rCrr!r!r!r#r?s
 

rc@s eZdZdZdd<03>Zdd<05>ZdS)rz
No ticks
cCs |<00>dd<00>S)N)r)r+r!r!r#rCpszNullLocator.__call__cCsgS)z<>"
Return the locations of the ticks.
.. note::
Because the values are Null, vmin and vmax are not used in this
method.
r!)r+r0r1r!r!r#rss zNullLocator.tick_valuesN)r8r9r:rTrCrr!r!r!r#rksrc@sDeZdZdZddd<04>Zddd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Zd d<0E>Z dS)ra
Determine the tick locations
The first time this function is called it will try to set the
number of ticks to make a nice tick partitioning. Thereafter the
number of ticks will be fixed so that interactive navigation will
be nice
NcCs ||_|dkri|_n||_dS)zX
Use presets to set locs based on lom. A dict mapping vmin, vmax->locs
N)r<00>presets)r+rrr!r!r#r-<00>szLinearLocator.__init__cCs |dk r||_|dk r||_dS)z#Set parameters within this locator.N)rr)r+rrr!r!r#r
<00>szLinearLocator.set_paramscCs|j<00><01>\}}|<00>||<02>S)z!Return the locations of the ticks)r;r/r)r+r0r1r!r!r#rC<00>szLinearLocator.__call__cCs|tj||dd<02>\}}||kr&||}}||f|jkrB|j||fS|jdkrT|<00><04>|jdkrbgSt<05>|||j<03>}|<00>|<03>S)Ng<4E><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)r<>r)r&r<>rr<00> _set_numticksr<73>Zlinspacer )r+r0r1<00>ticklocsr!r!r#r<00>s


zLinearLocator.tick_valuescCs
d|_dS)N<> )r)r+r!r!r#r<00>szLinearLocator._set_numtickscCs<>||kr||}}||kr*|d8}|d7}tddkr<>tt<02>||<00>t<02>t|jdd<01><02><01>\}}||dk8}t|jdd<01>| }t<02>||<00>|}t<02>||<00>|}t<08> ||<02>S)z+Try to choose the view limits intelligentlyr`zaxes.autolimit_mode<64> round_numbersg<00>?)
r<00>divmodr<64>r<>r<>rr<>r<>r&r<>)r+r0r1rq<00> remainder<65>scaler!r!r#r<00>s
 ( zLinearLocator.view_limits)NN)NN)
r8r9r:rTr-r
rCrrrr!r!r!r#rs 
rz3.0cCst||<00>dkS)Ng<4E><67><EFBFBD><EFBFBD><EFBFBD>|<7C>=)rg)rAr<>r!r!r#<00>closeto<74>sr%c@s@eZdZdZdd<03>Zdd<05>Zdd<07>Zdd <09>Zd
d <0B>Zd d <0A>Z dS)<0F>BasezEthis solution has some hacks to deal with floating point inaccuraciescCs|dkrtd<02><01>||_dS)Nrz'base' must be positive)r<>r<>)r+r<>r!r!r#r-<00>sz Base.__init__cCsBt||j<01>\}}t|d<01>r8t||jd<02>s8|d|jS||jS)z'return the largest multiple of base < xrr`)r"r<>r%)r+rArmr<>r!r!r#<00>lt<6C>szBase.ltcCs8t||j<01>\}}t||jd<01>r.|d|jS||jS)z(return the largest multiple of base <= xr`)r"r<>r%)r+rArmr<>r!r!r#<00>le<6C>szBase.lecCs<t||j<01>\}}t||jd<01>r.|d|jS|d|jS)z(return the smallest multiple of base > xr`rc)r"r<>r%)r+rArmr<>r!r!r#<00>gt<67>szBase.gtcCsBt||j<01>\}}t|d<01>r4t||jd<02>s4||jS|d|jS)z)return the smallest multiple of base >= xrr`)r"r<>r%)r+rArmr<>r!r!r#<00>ge<67>s
zBase.gecCs|jS)N)r<>)r+r!r!r#<00>get_base<73>sz Base.get_baseN)
r8r9r:rTr-r'r(r)r*r+r!r!r!r#r&<00>sr&c@s:eZdZdZddd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Zd S)rzQ
Set a tick on each integer multiple of a base within the view interval.
<20><00>?cCst|d<01>|_dS)Nr)<02> _Edge_integer<65>_edge)r+r<>r!r!r#r-<00>szMultipleLocator.__init__cCs|dk rt|d<02>|_dS)z#Set parameters within this locator.Nr)r-r.)r+r<>r!r!r#r
<00>szMultipleLocator.set_paramscCs|j<00><01>\}}|<00>||<02>S)z!Return the locations of the ticks)r;r/r)r+r0r1r!r!r#rCszMultipleLocator.__call__cCsb||kr||}}|jj}|j<00>|<01>|}||d||}||t<03>|d<00>|}|<00>|<05>S)Ng<4E><67><EFBFBD><EFBFBD>MbP?r<>)r.rr*r<>r<>r )r+r0r1rrWrPr!r!r#r s
zMultipleLocator.tick_valuescCsbtddkrN|j<01>|<01>|jj}|j<01>|<02>|jj}||krV|d8}|d7}n|}|}t<05>||<04>S)ze
Set the view limits to the nearest multiples of base that
contain the data.
zaxes.autolimit_moder!r`)rr.r(rr*r&r<>)r+rrr0r1r!r!r#rs 
zMultipleLocator.view_limitsN)r,) r8r9r:rTr-r
rCrrr!r!r!r#r<00>s 
 rr`r<>cCsjt||<00>}||d}t|<05>||kr.d}nt<01>dt<01>t|<05><01>d|<05>}dt<01>||<00>d}||fS)Nrcrrar`)rgr<>r<>r<>)r0r1rW<00> thresholdZdvZmeanvr<76>r$r!r!r#<00> scale_range$s  r0c@s0eZdZdZdd<03>Zdd<05>Zdd<07>Zdd <09>Zd
S) r-z<>
Helper for MaxNLocator, MultipleLocator, etc.
Take floating point precision limitations into account when calculating
tick locations as integer multiples of a step.
cCs$|dkrtd<02><01>||_t|<02>|_dS)z<>
*step* is a positive floating-point interval between ticks.
*offset* is the offset subtracted from the data limits
prior to calculating tick locations.
rz'step' must be positiveN)r<>rrg<00>_offset)r+rr<>r!r!r#r-6sz_Edge_integer.__init__cCsN|jdkr:t<01>|j|j<00>}tdd|d<00>}td|<04>}nd}t||<00>|kS)Nrg<><67><EFBFBD><EFBFBD><EFBFBD>|<7C>=rar<>g<Nё\<5C><>?)r1r<>r<>rr<>r<>rg)r+<00>ms<6D>edge<67>digitsZtolr!r!r#r%As 
 z_Edge_integer.closetocCs.t||j<01>\}}|<00>||jd<01>r*|dS|S)z"Return the largest n: n*step <= x.r`)r"rr%)r+rArmr<>r!r!r#r(Ksz_Edge_integer.lecCs.t||j<01>\}}|<00>||jd<01>r&|S|dS)z#Return the smallest n: n*step >= x.rr`)r"rr%)r+rArmr<>r!r!r#r*Rsz_Edge_integer.geN)r8r9r:rTr-r%r(r*r!r!r!r#r-/s
 
r-c@sleZdZdZeddddddd<06>Zdd<08>Zed d
<EFBFBD><00>Zed d <0C><00>Z d d<0E>Z
dd<10>Z dd<12>Z dd<14>Z dd<16>ZdS)rz<
Select no more than N intervals at nice locations.
raNFrc)r<00>steps<70>integer<65> symmetric<69>prune<6E> min_n_tickscOsP|r:d|krtjddd<04>|d|d<t|<01>dkr:td<07><01>|jf|j|<02><02>dS) aX
Parameters
----------
nbins : int or 'auto', optional, default: 10
Maximum number of intervals; one less than max number of
ticks. If the string `'auto'`, the number of bins will be
automatically determined based on the length of the axis.
steps : array-like, optional
Sequence of nice numbers starting with 1 and ending with 10;
e.g., [1, 2, 4, 5, 10], where the values are acceptable
tick multiples. i.e. for the example, 20, 40, 60 would be
an acceptable set of ticks, as would 0.4, 0.6, 0.8, because
they are multiples of 2. However, 30, 60, 90 would not
be allowed because 3 does not appear in the list of steps.
integer : bool, optional, default: False
If True, ticks will take only integer values, provided
at least `min_n_ticks` integers are found within the
view limits.
symmetric : bool, optional, default: False
If True, autoscaling will result in a range symmetric about zero.
prune : {'lower', 'upper', 'both', None}, optional, default: None
Remove edge ticks -- useful for stacked or ganged plots where
the upper tick of one axes overlaps with the lower tick of the
axes above it, primarily when :rc:`axes.autolimit_mode` is
``'round_numbers'``. If ``prune=='lower'``, the smallest tick will
be removed. If ``prune == 'upper'``, the largest tick will be
removed. If ``prune == 'both'``, the largest and smallest ticks
will be removed. If ``prune == None``, no ticks will be removed.
min_n_ticks : int, optional, default: 2
Relax *nbins* and *integer* constraints if necessary to obtain
this minimum number of ticks.
rz3.1z<EFBFBD>Calling MaxNLocator with positional and keyword parameter *nbins* is considered an error and will fail in future versions of matplotlib.)<01>messagerr`z6Keywords are required for all arguments except 'nbins'N)rrsrVr<>r
<00>default_params)r+r<>r=r!r!r#r-es'  zMaxNLocator.__init__cCs<>t<00>|<00>std<01><01>t<00>|<00>}t<00>t<00>|<00>dk<01>sH|ddksH|ddkrPtd<01><01>|ddkrjt<00>d|f<02>}|ddkr<>t<00>|df<02>}|S)NzSsteps argument must be an increasing sequence of numbers between 1 and 10 inclusiverr<>rar`)r<><00>iterabler<65>r<><00>anyZdiff<66>hstack)r5r!r!r#<00>_validate_steps<70>s

,  zMaxNLocator._validate_stepscCs(d|dd<02>|d|df}t<00>|<01>S)Ng<4E><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?r<>rar`)r<>r>)r5Zflightsr!r!r#<00>
_staircase<EFBFBD>szMaxNLocator._staircasec Ksd|kr*|<01>d<01>|_|jdkr*t|j<01>|_d|kr>|<01>d<03>|_d|krn|<01>d<04>}|dk rh|dkrhtd<07><01>||_d|kr<>td |<01>d<08><01>|_d
|kr<>|<01>d
<EFBFBD>}|dkr<>t<08> d d d d ddddddg
<EFBFBD>|_
n |<00> |<03>|_
|<00> |j
<EFBFBD>|_ d|kr<>|<01>d<14>|_|<01>r|<01><0F>\}}tjdd|<04><00>d<17>dS)a
Set parameters for this locator.
Parameters
----------
nbins : int or 'auto', optional
see `.MaxNLocator`
steps : array-like, optional
see `.MaxNLocator`
integer : bool, optional
see `.MaxNLocator`
symmetric : bool, optional
see `.MaxNLocator`
prune : {'lower', 'upper', 'both', None}, optional
see `.MaxNLocator`
min_n_ticks : int, optional
see `.MaxNLocator`
r<00>autor7r8N)<03>upper<65>lower<65>bothz/prune must be 'upper', 'lower', 'both', or Noner9r`r5g<00>?rcg@r<><00>rr<><00>rar6z3.1z4MaxNLocator.set_params got an unexpected parameter: )r:)<12>pop<6F>_nbinsrX<00>
_symmetricr<EFBFBD><00>_pruner<65><00> _min_n_ticksr<73><00>arrayZ_stepsr?r@<00>_extended_steps<70>_integer<65>popitemr<00>warn_deprecated)r+r=r8r5<00>key<65>_r!r!r#r
<00>s4 
  

"   zMaxNLocator.set_paramscCs<>|jdkr<|jdk r6t<02>|j<01><04>td|jd<00>d<04>}qBd}n|j}t|||<03>\}}||}||}|||}|j|} |j r<>| dkt<02>
| t<02> | <09><00>dkB}
| |
} t<02> | |k<05>dd} t ddk<02>r x@t| t| <09><01>D].} | | } || | } | | |}||kr<>Pq<>Wx<>tt| d<00><01>D]<5D>} | | } |j <09>r\t<02>|<07>t<02>|<06>|jdk<05>r\td| <0C>} || | } t| |<05>}|<0F>|| <00>}|<0F>|| <00>}t<02>||d<00>| | }||k||k@<00><17>}||jk<05>rP<00>qW||S) z<>
Generate a list of tick locations including the range *vmin* to
*vmax*. In some applications, one or both of the end locations
will not be needed, in which case they are trimmed off
elsewhere.
rANr`r6g<><67><EFBFBD><EFBFBD>MbP?rzaxes.autolimit_moder!)rHr;r<>r<>r7r<>rKr0rMrNrgr<>ZnonzerorrrV<00>reversedr<64>r<>r-r(r*r<><00>sum)r+r0r1rr$r<>Z_vminZ_vmaxZraw_stepr5Zigood<6F>isteprZ best_vminZ best_vmaxr3<00>low<6F>highrZnticksr!r!r#<00>
_raw_ticks<EFBFBD>sH

  
    
 
 zMaxNLocator._raw_tickscCs|j<00><01>\}}|<00>||<02>S)N)r;r/r)r+r0r1r!r!r#rCszMaxNLocator.__call__cCs<>|jrtt|<01>t|<02><01>}| }tj||ddd<03>\}}|<00>||<02>}|j}|dkr\|dd<00>}n*|dkrr|dd<07>}n|dkr<>|dd<07>}|<00>|<03>S) Ng<4E>vIh<49>%<=g<>+<2B><><EFBFBD><EFBFBD>=)r<><00>tinyrCr`rBr<>rD)rIr<>rgr&r<>rXrJr )r+r0r1rPr8r!r!r#r s  zMaxNLocator.tick_valuescCs`|jrtt|<01>t|<02><01>}| }tj||ddd<03>\}}tddkrT|<00>||<02>ddgS||fSdS)Ng<11>-<2D><><EFBFBD>q=g<>vIh<49>%<=)r<>rYzaxes.autolimit_moder!rr<>)rIr<>rgr&r<>rrX)r+rrr!r!r#r1s zMaxNLocator.view_limits)r8r9r:rT<00>dictr;r-<00> staticmethodr?r@r
rXrCrrr!r!r!r#rZs4  0<rz3.1racCs0|dkr| St<00>t<00>|<00>t<00>|<01><00>}||S)z#floor x to the nearest lower decadeg)r<>r<>r<>)rAr<><00>lxr!r!r#<00> decade_down?sr]cCs.|dkr |St<00>t<00>|<00>t<00>|<01><00>}||S)z#ceil x to the nearest higher decadeg)r<>r<>r<>)rAr<>r\r!r!r#<00> decade_upHsr^cCs4tjdddddd<06>|dkr(t|d<00>St|d<00>S) Nz3.0z3.1z`nearest_long`<60>functionz`round`)Zremoval<61>nameZobj_type<70> alternativerg<00>?)rrPrX)rAr!r!r#<00> nearest_longQs


 rbcCs<t<00>|<00>sdS|dkrdSt<00>t<00>|<00><01>t<00>|<01>}t|<02>S)NFgT)r<><00>isfiniter<65>rgr<>)rAr<>r\r!r!r#r<>Ys 
r<>cCs@|dkr |S|dkr"t| |<01> S|t<01>t<01>|<00>t<01>|<01><00>S)z<>
Return the largest integer power of *base* that's less or equal to *x*.
If *x* is negative, the exponent will be *greater*.
r)<04>_decade_greater_equalr<6C>r<>r<>)rAr<>r!r!r#<00>_decade_less_equalbs recCs@|dkr |S|dkr"t| |<01> S|t<01>t<01>|<00>t<01>|<01><00>S)z<>
Return the smallest integer power of *base* that's greater or equal to *x*.
If *x* is negative, the exponent will be *smaller*.
r)rer<>r<>r<>)rAr<>r!r!r#rdms rdcCs4|dkrt| |<01> St||<01>}||kr0||}|S)z<>
Return the largest integer power of *base* that's less than *x*.
If *x* is negative, the exponent will be *greater*.
r)<02>_decade_greaterre)rAr<>Zlessr!r!r#<00> _decade_lessxs 
rgcCs4|dkrt| |<01> St||<01>}||kr0||9}|S)z<>
Return the smallest integer power of *base* that's greater than *x*.
If *x* is negative, the exponent will be *smaller*.
r)rgrd)rAr<>Zgreaterr!r!r#rf<00>s 
rfcCst|t<01>|<00><00>dkS)Ng<4E><67><EFBFBD><EFBFBD><EFBFBD>|<7C>=)rgr<>r<>)rAr!r!r#r<><00>sr<>c@sTeZdZdZddd<07>Zddd <09>Zd
d <0B>Zd d <0A>Zdd<0F>Zdd<11>Z dd<13>Z
dd<15>Z dS)rz3
Determine the tick locations for log axes
<20>$@<40>g<00>?rENcCs>|dkrtdrd}nd}|<00>|<01>|<00>|<02>||_||_dS)a
Place ticks on the locations : subs[j] * base**i
Parameters
----------
subs : None, string, or sequence of float, optional, default (1.0,)
Gives the multiples of integer powers of the base at which
to place ticks. The default places ticks only at
integer powers of the base.
The permitted string values are ``'auto'`` and ``'all'``,
both of which use an algorithm based on the axis view
limits to determine whether and how to put ticks between
integer powers of the base. With ``'auto'``, ticks are
placed only between integer powers; with ``'all'``, the
integer powers are included. A value of None is
equivalent to ``'auto'``.
Nz_internal.classic_moder<65>rA)rr<><00>subs<62>numdecsr)r+r<>rjrkrr!r!r#r-<00>s

zLogLocator.__init__cCsD|dk r|<00>|<01>|dk r$|<00>|<02>|dk r2||_|dk r@||_dS)z#Set parameters within this locator.N)r<>rjrkr)r+r<>rjrkrr!r!r#r
<00>s

zLogLocator.set_paramscCst|<01>|_dS)zW
set the base of the log scaling (major tick every base**i, i integer)
N)r<>r<>)r+r<>r!r!r#r<><00>szLogLocator.basecCsJ|dkrd|_n6t|t<02>r6|dkr.td|<00><01>||_ntj|td<05>|_dS)zO
set the minor ticks for the log scaling every base**i*subs[j]
NrA)<02>allrAz2A subs string must be 'all' or 'auto'; found '%s'.)Zdtype)<07>_subs<62>
isinstancer<EFBFBD>r<>r<>r<>r<>)r+rjr!r!r#rj<00>s
zLogLocator.subscCs|j<00><01>\}}|<00>||<02>S)z!Return the locations of the ticks)r;r/r)r+r0r1r!r!r#rC<00>szLogLocator.__call__c s<>|jdkr0|jdk r*t<02>|j<01><04>dd<03>}q6d}n|j}|j}t|jd<04>r<>|jjjdkr<>t <09>
t <09> |<02>t <09> |<04><00>}t<02> ||j |<02>}||}|S|dkr<>|jdk r<>|j<01><0E>}|dks<>t<02>|<01>s<>td<07><01>t<11>d||<02>||kr<>||}}t <09> |<01>t <09> |<04>}t <09> |<02>t <09> |<04>}t <09>|<08>t <09>
|<07>} t|jt<16><02>r<>|jdk<02>r>d nd
}
| d k<04>sV|d k<00>rz|jdk<02>rlt<02>g<00>St<02>d
g<01><01>n t<02> |
|<04><02>n|j<15>td <00>r<>tt <09>
| |d<00>d<0E>n| d|d} t<1A><00>dk<04>p<>t<1A><00>dk<02>o<><6F>dd
k} t<02> t <09>|<07>| t <09>
|<08>d| | <0B>}t|d<10><02>rZ|j<1B><1C><00>|<05>}| <0C>r<>| dk<02>rNt<02>t<02><1F>|<06><02>}n
t<02>g<00>}nB| <0C>r<>| dk<02>r<>t<02> <20>fdd<12>||D<00><01>}n
t<02>g<00>}n||}t<11>d|<06>t<1A><00>dk<04>r<>| dk<02>r<>||k||k@<00>!<21>dk<01>r<>t"<22><00>#||<02>S|<00>$|<06>SdS)NrArcr6<00>axes<65>polargzAData has no positive values, and therefore can not be log-scaled.zvmin %s vmax %sg@g<00>?rar<>z_internal.classic_moder`r<00>
_transformcsg|] }<01>|<00>qSr!r!)rDZ decade_start)rjr!r#rG) sz*LogLocator.tick_values.<locals>.<listcomp>z ticklocs %r)%rr;r<>r<>r7r<><00>hasattrror`r<>r<>r<>r<>rkr3rcr<><00>_log<6F>debugr<67>rnrmr<>rLrr<>rVrq<00>inverted<65> transform<72>ravel<65>outerZ concatenaterTrrr ) r+r0r1rr<><00>decadesrZlog_vminZlog_vmaxr<78>Z_first<73>strideZ have_subsr!)rjr#r<00>sl




 
"( 
 
  
zLogLocator.tick_valuescCsx|j}|<00>||<02>\}}|jjjdkrLt<05>t<05>|<02>t<05>|<03><00>}|||j}t ddkrpt
||j<00>}t ||j<00>}||fS)z+Try to choose the view limits intelligentlyrpzaxes.autolimit_moder!) r<>r<>r;ror`r<>r<>r<>rkrrerd)r+r0r1r<>r!r!r#r: s   zLogLocator.view_limitscCs<>t<00>|<01>rt<00>|<02>sdS||kr*||}}|dkr@t<02>d<03>dS|j<04><05>}t<00>|<03>sXd}|dkrd|}||kr<>t||j<07>}t||j<07>}||fS)N)r`rarz@Data has no positive values, and therefore cannot be log-scaled.gY<67><59><EFBFBD>n<>) r<>rcrrr;r3rgr<>rf)r+r0r1r,r!r!r#r<>J s"


  zLogLocator.nonsingular)rhrirEN)NNNN) r8r9r:rTr-r
r<>rjrCrrr<>r!r!r!r#r<00>s

Yrc@s<eZdZdZd dd<04>Zddd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>ZdS)rz=
Determine the tick locations for symmetric log axes
NcCsb|dk r|j|_|j|_n&|dk r8|dk r8||_||_ntd<02><01>|dkrRdg|_n||_d|_dS)z>
place ticks on the location= base**i*subs[j]
Nz?Either transform, or both linthresh and base, must be provided.g<00>?r<>)r<>r<>r<>r<>r<>rmr)r+rvrjr<>r<>r!r!r#r-f s

zSymmetricalLogLocator.__init__cCs |dk r||_|dk r||_dS)z#Set parameters within this locator.N)rrm)r+rjrr!r!r#r
y sz SymmetricalLogLocator.set_paramscCs|j<00><01>\}}|<00>||<02>S)z!Return the locations of the ticks)r;r/r)r+r0r1r!r!r#rC<00> szSymmetricalLogLocator.__call__c sV|j<00>|j}||kr||}}d}}}|| krTd}|| kr<>d}||kr<>d}nT|dkr<>|dkrvd}||kr~d}q<>||gSn(||kr<>||kr<>d}d}q<>||gSnd}<06>fdd<05>}|r<>|r<>||| d<00>}q<>|| | d<00>}nd}|<06>r|<05>r|||d<00>} n|||d<00>} nd} |d|d| d| d}
|<05>rD|
d7}
t|
|jdd<06>} g} |<04>r<>| <0C>d<08>t<05>|d|d| <0B>ddd<08><00>|<05>r<>| <0C>d <09>|<06>r<>| <0C><04>t<05>| d| d| <0B><00>|jdk<08>r<>t<05>d
<EFBFBD><00>} n t<05> |j<08>} t
| <0A>dk<04>s| dd k<03>rBg}x8| D]*}|dk<02>r,|<0E>|<0F>n|<0E>| |<00><00>qWn| }|<00> t<05> |<0E><01>S) NFTrcs<t<00>t<00>|<00>t<00><02><00><00>}t<00>t<00>|<01>t<00><02><00><00>}||fS)N)r<>r<>r<>r<>)<02>lo<6C>hi)r<>r!r#<00> get_log_range<67> sz8SymmetricalLogLocator.tick_values.<locals>.get_log_ranger`)rrr<>gg@g<00>?) r<>r<>r<>r<00>extendr<64>r<><00>appendrmr<>rVr rL)r+r0r1<00>tZhas_aZhas_bZhas_cr}Za_rangeZc_rangeZ total_ticksrzryrjrZdecader!)r<>r#r<00> sr
 



  
   

 z!SymmetricalLogLocator.tick_valuescCsd|j}||kr||}}tddkrTt||<03>}t||<03>}||krTt||<03>}t||<03>}t<06>||<02>}|S)z+Try to choose the view limits intelligentlyzaxes.autolimit_moder!)r<>rrerdrgrfr&r<>)r+r0r1r<><00>resultr!r!r#r<00> s
 



 z!SymmetricalLogLocator.view_limits)NNNN)NN) r8r9r:rTr-r
rCrrr!r!r!r#ra s 

jrc@s<eZdZdZddd<04>Zddd<07>Zdd <09>Zd
d <0B>Zd d <0A>ZdS)r z5
Determine the tick locations for logit axes
FcCs
||_dS)z4
place ticks on the logit locations
N)<01>minor)r+r<>r!r!r#r-
szLogitLocator.__init__NcCs|dk r||_dS)z#Set parameters within this locator.N)r<>)r+r<>r!r!r#r

szLogitLocator.set_paramscCs|j<00><01>\}}|<00>||<02>S)z!Return the locations of the ticks)r;r/r)r+r0r1r!r!r#rC
szLogitLocator.__call__cCs<>t|jd<01>r"|jjjdkr"td<03><01>|<00>||<02>\}}t<06>|d|<00>}t<06>|d|<00>}t<06>|<01>}t<06> |<02>}|j
s<EFBFBD>g}|dkr<>t<06> |t d|d<00><02>}|<05> d|<00>|dkr<>|kr<>nn
|<05>d<08>|dkr<>t<06> td|<03>|d<00> }|<05> dd|<00>n<>g}|d k<01>r<t<06> |t d|<04><02>}t<06>t<06> d
d<07>d|<00><02><11>}|<05> |<07>|dk<01>rT|k<01>rnnn|<05> d d d dddg<06>|d
k<05>r<>t<06> td
|<03>|d<00> }dt<06>t<06> d
d<07>d|<00><02><11>}|<05> |<07>|<00>t<06>|<05><01>S)Nrorpz%Polar axis cannot be logit scaled yetr`r<>rrag<00>?r<>rcg<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?g333333<33>?g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?g333333<33>?gffffff<66>?g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)rrr;ror`r@r<>r<>r<>r<>r<>r<>r<>r<>r~rr<>rxrwr rL)r+r0r1Z
decade_minZ
decade_maxrZexpoZnewticksr!r!r#r
s:





 
zLogitLocator.tick_valuescCs<>d}t<00>|<01>rt<00>|<02>s|S||kr.||}}|jdk rR|j<02><03>}t<00>|<04>sV|Snd}|dkrb|}|dkrrd|}||kr<>d|dd|fS||fS)N)gH<67><48><EFBFBD><EFBFBD><EFBFBD>z>g<>P<><50><EFBFBD><EFBFBD>?gH<67><48><EFBFBD><EFBFBD><EFBFBD>z>rr`g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)r<>rcr;r3)r+r0r1Z initial_ranger,r!r!r#r<>>
s"



zLogitLocator.nonsingular)F)N) r8r9r:rTr-r
rCrr<>r!r!r!r#r 
s 

(r c@seZdZdZdd<03>ZdS)rz<>
Dynamically find major tick positions. This is actually a subclass
of `~matplotlib.ticker.MaxNLocator`, with parameters *nbins = 'auto'*
and *steps = [1, 2, 2.5, 5, 10]*.
cCs@tdrd}ddddg}nd}dddddg}tj|||d <09>d
S) z<>
To know the values of the non-public parameters, please have a
look to the defaults of `~matplotlib.ticker.MaxNLocator`.
z_internal.classic_moder6r`rcrrarAg@)rr5N)rrr-)r+rr5r!r!r#r-c
s zAutoLocator.__init__N)r8r9r:rTr-r!r!r!r#r]
src@s*eZdZdZd dd<04>Zdd<06>Zdd<08>ZdS)
rz<>
Dynamically find minor tick positions based on the positions of
major ticks. The scale must be linear with major ticks evenly spaced.
NcCs
||_dS)z<>
*n* is the number of subdivisions of the interval between
major ticks; e.g., n=2 will place a single minor tick midway
between major ticks.
If *n* is omitted or None, it will be set to 5 or 4.
N)<01>ndivs)r+rWr!r!r#r-v
szAutoMinorLocator.__init__c Cs
|j<00><01>dkrt<02>d<02>gS|j<00><04>}y|d|d}Wntk
rNgSX|jdkr<>dt<07>|<02>d}t<07> |ddd d
g<04><02>
<EFBFBD>r<>d }q<>d }n|j}||}|j<00> <0B>\}}||kr<>||}}|d}|||d|} |||d|}
t<07> | |
|<05>|} |<00> | <0B>S) z!Return the locations of the ticksr<73>z5AutoMinorLocator does not work with logarithmic scaler`rNrag<00>?g@g@g$@rrE)r;Z get_scalerrZget_majorticklocsr<73>r<>r<>r<><00>iscloser=r/r<>r ) r+Z majorlocsZ majorstepZmajorstep_no_exponentr<74>Z minorstepr0r1<00>t0ZtminZtmaxrPr!r!r#rC<00>
s.



zAutoMinorLocator.__call__cCstdt|<00><00><01>dS)Nz(Cannot get tick locations for a %s type.)r@r )r+r0r1r!r!r#r<00>
szAutoMinorLocator.tick_values)N)r8r9r:rTr-rCrr!r!r!r#rq
s
)rc@s@eZdZdZdd<03>Zdd<05>Zdd<07>Zdd <09>Zd
d <0B>Zd d <0A>Z dS)<0F>OldAutoLocatorzo
On autoscale this class picks the best MultipleLocator to set the
view limits and the tick locs.
cCs t<00>|_dS)N)r<00>_locator)r+r!r!r#r-<00>
szOldAutoLocator.__init__cCs|<00><00>|<00>|<00><02><00>S)z!Return the locations of the ticks)rr r<>)r+r!r!r#rC<00>
szOldAutoLocator.__call__cCstdt|<00><00><01>dS)Nz(Cannot get tick locations for a %s type.)r@r )r+r0r1r!r!r#r<00>
szOldAutoLocator.tick_valuescCs>|j<00><01>\}}tj||dd<02>\}}t||<00>}|<00>|<03>|_dS)z1refresh internal information based on current limg<6D><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)r<>N)r;r/r&r<>rg<00> get_locatorr<72>)r+r0r1rmr!r!r#r<00>
s zOldAutoLocator.refreshcCs&t||<00>}|<00>|<03>|_|j<02>||<02>S)z+Try to choose the view limits intelligently)rgr<>r<>r)r+r0r1rmr!r!r#r<00>
s  zOldAutoLocator.view_limitscCs<>t|<01>}|dkrtd<02>}nvyt<02>|<01>}Wntk
rDtd<03><01>YnXt<02>|<03>}d|}|d|krj|}n|d|kr<>|d}n|d}t|<06>}|S) z)pick the best locator based on a distancerg<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?z'AutoLocator illegal data interval rangerarrcg@g@)rgrr<>r<><00> OverflowErrorr r<>)r+rmrRZldZfldr<64>Zticksizer!r!r#r<><00>
s 

  
zOldAutoLocator.get_locatorN)
r8r9r:rTr-rCrrrr<>r!r!r!r#r<><00>
sr<>)r`r<>)ra)ra)ra)?rTr<><00>loggingr<67>r<>Znumpyr<79>Z
matplotlibrrrr&<00> getLoggerr8rs<00>__all__r$<00>objectr%rrrrrr r
r r_r r rrrrrrrrrrrrsr%r&rr0r-rr]r^rbr<>rerdrgrfr<>rrr rrr<>r!r!r!r#<00><module><3E>s<>   
 >  AVfAtg,I)-
+f  
  J!\=