Files
intellecton/venv/lib/python3.12/site-packages/matplotlib/__pycache__/ticker.cpython-312.pyc
T

1294 lines
125 KiB
Plaintext
Raw Normal View History

Ë
†Rju£ãó|dZddlZddlZddlZddlZddlmZddlZddlZ ddl
Z ddl
m Z m
Z
ddl
mZej e«ZdZGdd«ZGd „d
«ZGd d e«ZGd
de«ZGdde«ZGdde«ZGdde«ZGddej,«ZGdde«ZGdde«ZGdde«ZGdde«ZGdd e«Z Gd!„d"e «Z!Gd#„d$e«Z"Gd%„d&e«Z#Gd'„d(e«Z$Gd)„d*e«Z%Gd+„d,e%«Z&Gd-„d.e%«Z'Gd/„d0e%«Z(Gd1„d2e%«Z)Gd3„d4e%«Z*dNd5„Z+Gd6„d7«Z,Gd8„d9e%«Z-d:dd;œd<„Z.d=„Z/d>„Z0d?„Z1d@„Z2dA„Z3GdB„dCe%«Z4GdD„dEe%«Z5GdF„dGe%«Z6GdH„dIe-«Z7GdJ„dKe-«Z8GdL„dMe%«Z9y)Oa
Tick locating and formatting
============================
This module contains classes for configuring tick locating and formatting.
Generic tick locators and formatters are provided, as well as domain specific
custom ones.
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.
.. _tick_locating:
.. _locators:
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:
======================= =======================================================
`AutoLocator` `MaxNLocator` with simple defaults. This is the default
tick locator for most plotting.
`MaxNLocator` Finds up to a max number of intervals with ticks at
nice locations.
`LinearLocator` Space ticks evenly from min to max.
`LogLocator` Space ticks logarithmically from min to max.
`MultipleLocator` Ticks and range are a multiple of base; either integer
or float.
`FixedLocator` Tick locations are fixed.
`IndexLocator` Locator for index plots (e.g., where
``x = range(len(y))``).
`NullLocator` No ticks.
`SymmetricalLogLocator` Locator for use with the symlog norm; works like
`LogLocator` for the part outside of the threshold and
adds 0 if inside the limits.
`AsinhLocator` Locator for use with the asinh norm, attempting to
space ticks approximately uniformly.
`LogitLocator` Locator for logit scaling.
`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 :mod:`.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.
.. note::
`Locator` instances should not be used with more than one
`~matplotlib.axis.Axis` or `~matplotlib.axes.Axes`. So instead of::
locator = MultipleLocator(5)
ax.xaxis.set_major_locator(locator)
ax2.xaxis.set_major_locator(locator)
do the following instead::
ax.xaxis.set_major_locator(MultipleLocator(5))
ax2.xaxis.set_major_locator(MultipleLocator(5))
.. _formatters:
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.
========================= =====================================================
`NullFormatter` No labels on the ticks.
`FixedFormatter` Set the strings manually for the labels.
`FuncFormatter` User defined function sets the labels.
`StrMethodFormatter` Use string `format` method.
`FormatStrFormatter` Use an old-style sprintf format string.
`ScalarFormatter` Default formatter for scalars: autopick the format
string.
`LogFormatter` Formatter for log axes.
`LogFormatterExponent` Format values for log axis using
``exponent = log_base(value)``.
`LogFormatterMathtext` Format values for log axis using
``exponent = log_base(value)`` using Math text.
`LogFormatterSciNotation` Format values for log axis using scientific notation.
`LogitFormatter` Probability formatter.
`EngFormatter` Format labels in engineering notation.
`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)
In addition to a `.Formatter` instance, `~.Axis.set_major_formatter` and
`~.Axis.set_minor_formatter` also accept a ``str`` or function. ``str`` input
will be internally replaced with an autogenerated `.StrMethodFormatter` with
the input ``str``. For function input, a `.FuncFormatter` with the input
function will be generated and used.
See :doc:`/gallery/ticks/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.
éN)ÚIntegral)Ú_apiÚcbook)Ú
transforms)Ú
TickHelperÚ FormatterÚFixedFormatterÚ
NullFormatterÚ
FuncFormatterÚFormatStrFormatterÚStrMethodFormatterÚScalarFormatterÚ LogFormatterÚLogFormatterExponentÚLogFormatterMathtextÚLogFormatterSciNotationÚLogitFormatterÚ EngFormatterÚPercentFormatterÚLocatorÚ IndexLocatorÚ FixedLocatorÚ NullLocatorÚ
LinearLocatorÚ
LogLocatorÚ AutoLocatorÚMultipleLocatorÚ MaxNLocatorÚAutoMinorLocatorÚSymmetricalLogLocatorÚ AsinhLocatorÚ LogitLocatorcó<eZdZdZd
dZdZdZdZdZdZdZ y ) Ú
_DummyAxisÚdummycó.d|_d|_||_y)N)ré)Ú_data_intervalÚ_view_intervalÚ_minpos)ÚselfÚminposs úT/home/antigravity/intellecton/venv/lib/python3.12/site-packages/matplotlib/ticker.pyÚ__init__z_DummyAxis.__init__£sØÔØÔ؈ ócó|jS©r)©r+s r-Úget_view_intervalz_DummyAxis.get_view_interval¨óØ×"r/có||f|_yr1r2©r+ÚvminÚvmaxs r-Úset_view_intervalz_DummyAxis.set_view_interval«óØ# T˜lˆÕr/có|jSr1)r*r3s r-Ú
get_minposz_DummyAxis.get_minpos®s Ø|‰|Ðr/có|jSr1©r(r3s r-Úget_data_intervalz_DummyAxis.get_data_interval±r5r/có||f|_yr1r?r7s r-Úset_data_intervalz_DummyAxis.set_data_interval´r;r/cóy)©r3s r-Úget_tick_spacez_DummyAxis.get_tick_space·sàr/r)
Ú__name__Ú
__module__Ú __qualname__r.r4r:r=r@rBrFrEr/r-r$r$ s*Ø€Hóò
òr/r$cóeZdZdZdZdZy)rNcó||_yr1)Úaxis)r+rMs r-Úset_axiszTickHelper.set_axis¿s ؈ r/c ó>|jtdi|¤Ž|_yy)NrE)rMr$©r+Úkwargss r-Úcreate_dummy_axiszTickHelper.create_dummy_axisÂs Ø 9‰9Ð Ü, ,ˆD r/)rHrIrJrMrNrRrEr/r-rr¼sØ €Dòó-r/rcóPeZdZdZgZd dZdZdZdZdZ dZ
e d „«Z d
Z
y) rz=
Create a string based on a tick value and location.
Ncótd«)z
Return the format for tick value *x* at position pos.
``pos=None`` indicates an unspecified location.
úDerived must override©ÚNotImplementedError©r+Úposs r-Ú__call__zFormatter.__call__Ïsô
"Ð"9Ó:r/cóz|j|«t|«Dcgc]\}}|||«Œc}}Scc}}w)z1Return the tick labels for all the ticks at once.)Úset_locsÚ enumerate)r+ÚvaluesÚvalues r-Ú format_tickszFormatter.format_ticksÖs1à
Ü/8¸Ó/@×A¡8 1 eU˜A•ÓAùÓAs 7có$|j|«S)zk
Return the full string representation of the value with the
position unspecified.
)r[©r+ras r-Ú format_datazFormatter.format_dataÛsð
}‰}˜#r/có$|j|«S)z|
Return a short string version of the tick value.
Defaults to the position-independent long value.
©rerds r-Úformat_data_shortzFormatter.format_data_shortâsð ×Ñ Ó&r/cóy©rEr3s r-Ú
get_offsetzFormatter.get_offsetêsØr/có||_y)
Set the locations of the ticks.
This method is called before computing the tick labels because some
formatters need to know all tick locations to do so.
Úlocs©r+ros r-r]zFormatter.set_locsís ðˆ r/cóPtjdr|jdd«S|S)a 
Some classes may want to replace a hyphen for minus with the proper
Unicode symbol (U+2212) for typographical correctness. This is a
helper method to perform such a replacement when it is enabled via
:rc:`axes.unicode_minus`.
zaxes.unicode_minusú-u−)ÚmplÚrcParamsÚreplace)Úss r-Ú fix_minuszFormatter.fix_minusös/ô—<<Ð 4Ò ˜ àð r/cóy)z6Subclasses may want to override this to set a locator.NrE)r+Úlocators r-Ú _set_locatorzFormatter._set_locatorsà r/r1)rHrIrJÚ__doc__ror[rbrerhrlr]Ú staticmethodrwrzrEr/r-rrÇsFñð
€DóBò
òðñ óð ó
r/rcóeZdZdZddZy)r
zAlways return the empty string.NcóyrjrErXs r-r[zNullFormatter.__call__
sàr/r1)rHrIrJr{r[rEr/r-r
r
s
Ùr/r
có*eZdZdZdZddZdZdZy)r
Return fixed strings for tick labels based only on position, not value.
.. note::
`.FixedFormatter` should only be used together with `.FixedLocator`.
Otherwise, the labels may end up in unexpected positions.
có ||_d|_y)z?Set the sequence *seq* of strings that will be used for labels.rkN)ÚseqÚ
offset_string)r+rs r-r.zFixedFormatter.__init__sàˆŒØˆÕr/NcóV||t|j«k\ry|j|S)a
Return 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.
rk)ÚlenrrXs r-r[zFixedFormatter.__call__s)ð ˆ;˜#¤ T§X¡X£Òà—8‘8˜C‘=Ð r/có|jSr1©rr3s r-rlzFixedFormatter.get_offset*óØ×!r/có||_yr1r†©r+Úofss r-Úset_offset_stringz FixedFormatter.set_offset_string-ó
Ø ˆÕr/r1©rHrIrJr{r.r[rlrrEr/r-r r sñò ó
!r/r có*eZdZdZdZddZdZdZy)r
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.
có ||_d|_yrj)Úfuncr)r+rs r-r.zFuncFormatter.__init__:s؈Œ ؈Õr/Ncó&|j||«S)zq
Return the value of the user defined function.
*x* and *pos* are passed through as-is.
)rrXs r-r[zFuncFormatter.__call__>sð y‰y˜˜CÓ Ð r/có|jSr1r†r3s r-rlzFuncFormatter.get_offsetFr‡r/có||_yr1r†r‰s r-rzFuncFormatter.set_offset_stringIr/r1rrEr/r-r r 1sñò ó!r/r cóeZdZdZdZddZy)r a‡
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.
Negative numeric values (e.g., -1) will use a dash, not a Unicode minus;
use mathtext to get a Unicode minus by wrapping the format specifier with $
(e.g. "$%g$").
có||_yr1©Úfmt©r+r—s r-r.zFormatStrFormatter.__init__Yó Øˆr/Ncó |j|zS)zw
Return the formatted label string.
Only the value *x* is formatted. The position is ignored.
rrXs r-r[zFormatStrFormatter.__call__\sð x‰x˜!‰|Ðr/r1©rHrIrJr{r.r[rEr/r-r r Msñ òôr/r có"eZdZdZˆfdZˆxZS)Ú_UnicodeMinusFormata.
A specialized string formatter so that `.StrMethodFormatter` respects
:rc:`axes.unicode_minus`. This implementation relies on the fact that the
format string is only ever called with kwargs *x* and *pos*, so it blindly
replaces dashes by unicode minuses without further checking.
cóJtjt|
||««Sr1)rrwÚsuperÚ format_field)r+raÚ format_specÚ __class__s €r-r z _UnicodeMinusFormat.format_fieldms ø€Ü×"¤5¡7Ñ#7¸¸{Ó#KÓLr/)rHrIrJr{r Ú
__classcell__©s@r-rresø„ñ÷MðMr/rcóeZdZdZdZddZy)r

Use a new-style format string (as used by `str.format`) to format the tick.
The field used for the tick value must be labeled *x* and the field used
for the tick position must be labeled *pos*.
The formatter will respect :rc:`axes.unicode_minus` when formatting
negative numeric values.
It is typically unnecessary to explicitly construct `.StrMethodFormatter`
objects, as `~.Axis.set_major_formatter` directly accepts the format string
itself.
có||_yr1rr˜s r-r.zStrMethodFormatter.__init__€r™r/NcóNt«j|j||¬«S)z
Return the formatted label string.
*x* and *pos* are passed to `str.format` as keyword arguments
with those exact names.
)rYrZ)rÚformatr—rXs r-r[zStrMethodFormatter.__call__ƒs#ô+¨D¯H©H¸¸Cr/r1rrEr/r-r
r
qsñ òôDr/r
cóâeZdZdZdddœdZdZdZeee¬«ZdZ d „Z
ee e
¬«Z d
Z d Z
ee e
¬«Zd Zd
ZdZeee¬«ZddZdZdZdZdZdZdZdZdZdZy)ra@
Format tick values as a number.
Parameters
----------
useOffset : bool or float, default: :rc:`axes.formatter.useoffset`
Whether to use offset notation. See `.set_useOffset`.
useMathText : bool, default: :rc:`axes.formatter.use_mathtext`
Whether to use fancy math formatting. See `.set_useMathText`.
useLocale : bool, default: :rc:`axes.formatter.use_locale`.
Whether to use locale settings for decimal sign and positive sign.
See `.set_useLocale`.
usetex : bool, default: :rc:`text.usetex`
To enable/disable the use of TeX's math mode for rendering the
numbers in the formatter.
.. versionadded:: 3.10
Notes
-----
In addition to the parameters above, the formatting of scientific vs.
floating point representation can be configured via `.set_scientific`
and `.set_powerlimits`).
**Offset notation and scientific notation**
Offset notation and scientific notation look quite similar at first sight.
Both split some information from the formatted tick values and display it
at the end of the axis.
- The scientific notation splits up the order of magnitude, i.e. a
multiplicative scaling factor, e.g. ``1e6``.
- The offset notation separates an additive constant, e.g. ``+1e6``. The
offset notation label is always prefixed with a ``+`` or ``-`` sign
and is thus distinguishable from the order of magnitude label.
The following plot with x limits ``1_000_000`` to ``1_000_010`` illustrates
the different formatting. Note the labels at the right edge of the x axis.
.. plot::
lim = (1_000_000, 1_000_010)
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, gridspec_kw={'hspace': 2})
ax1.set(title='offset notation', xlim=lim)
ax2.set(title='scientific notation', xlim=lim)
ax2.xaxis.get_major_formatter().set_useOffset(False)
ax3.set(title='floating-point notation', xlim=lim)
ax3.xaxis.get_major_formatter().set_useOffset(False)
ax3.xaxis.get_major_formatter().set_scientific(False)
N)Úusetexcó@|tjd}tjd|_|j|«|j |«|j |«d|_d|_d|_tjd|_ |j|«y)Nzaxes.formatter.useoffsetzaxes.formatter.offset_thresholdrrkTzaxes.formatter.limits) rsrtÚ_offset_thresholdÚ
set_useOffsetÚ
set_usetexÚset_useMathTextÚorderOfMagnituder¨Ú _scientificÚ _powerlimitsÚ
set_useLocale)r+Ú useOffsetÚ useMathTextÚ useLocalerªs r-r.zScalarFormatter.__init__Äsà Ð ÜŸ Ð%?Ñ@ˆIä L‰LÐ 
Ôà ×ј9Ô ˜ÔØ ×ј[Ô)Ø !ˆÔ؈Œ ؈ÔÜŸL™LÐ)@ÑÔØ ×ј9Õ%r/có|jS)z8Return whether TeX's math mode is enabled for rendering.)Ú_usetexr3s r-Ú
get_usetexzScalarFormatter.get_usetexÓs à|‰|Ðr/có:tj|d«|_y)zJSet whether to use TeX's math mode for rendering numbers in the formatter.ú text.usetexN)rsÚ
_val_or_rcr¸©r+Úvals r-zScalarFormatter.set_usetex×sä—~~ c¨=Ó9ˆ r/)ÚfgetÚfsetcó|jS)a$
Return whether automatic mode for offset notation is active.
This returns True if ``set_useOffset(True)``; it returns False if an
explicit offset was set, e.g. ``set_useOffset(1000)``.
See Also
--------
ScalarFormatter.set_useOffset
)Ú
_useOffsetr3s r-Ú
get_useOffsetzScalarFormatter.get_useOffsetÝsðÐr/cóF|dvrd|_||_yd|_||_y)
Set whether to use offset notation.
When formatting a set numbers whose value is large compared to their
range, the formatter can separate an additive constant. This can
shorten the formatted numbers so that they are less likely to overlap
when drawn on an axis.
Parameters
----------
val : bool or float
- If False, do not use offset notation.
- If True (=automatic mode), use offset notation if it can make
the residual numbers significantly shorter. The exact behavior
is controlled by :rc:`axes.formatter.offset_threshold`.
- If a number, force an offset of the given value.
Examples
--------
With active offset notation, the values
``100_000, 100_002, 100_004, 100_006, 100_008``
will be formatted as ``0, 2, 4, 6, 8`` plus an offset ``+1e5``, which
is written to the edge of the axis.
)TFrFN)ÚoffsetrÂs r-r­zScalarFormatter.set_useOffsetês(ð6  ؈DŒKØ!ˆD#ˆDŒO؈DKr/có|jS)z
Return whether locale settings are used for formatting.
See Also
--------
ScalarFormatter.set_useLocale
)Ú
_useLocaler3s r-Ú
get_useLocalezScalarFormatter.get_useLocalesðÐr/cóH|tjd|_y||_y)
Set whether to use locale settings for decimal sign and positive sign.
Parameters
----------
val : bool or None
*None* resets to :rc:`axes.formatter.use_locale`.
Nzaxes.formatter.use_locale)rsrts r-zScalarFormatter.set_useLocales!ð ˆ!Ÿl™lÐ+FÑGˆD!ˆDOr/cóî|j|jrU|jr-djˆfd|j d«D«««St j |fd««S|z«S)zX
Format *arg* with *fmt*, applying Unicode minus and locale if desired.
ú,c3ónK|],}tj|fd«jdd«Œ.y­w)TrËz{,}N)ÚlocaleÚ
format_stringru)Ú.0ÚpartÚargs €r-ú <genexpr>zAScalarFormatter._format_maybe_minus_and_locale.<locals>.<genexpr>/s8øèø€ò!×.¨t°c°V¸B×JÈ3ÐPU×6ùsƒ25T)rwÚ _useMathTextÚjoinÚsplitrÍ)r+r—s `r-Ú_format_maybe_minus_and_localez.ScalarFormatter._format_maybe_minus_and_locale(s€ø€ð~‰~ð —?:>×9JÒ9Jðó6Ø&)§i¡i°£nô ð ô
×*¨3°°¸Ó  ð ð˜3‘Yó ð r/có|jS)z‰
Return whether to use fancy math formatting.
See Also
--------
ScalarFormatter.set_useMathText
)r3s r-Úget_useMathTextzScalarFormatter.get_useMathText5sð× Ñ Ð r/cól|€štjd|_|jdurs ddlm}|j |j
tjd¬«d¬«}|ttjd ««k(rtjd
«yyy||_y#t$rd}YŒNwxYw) a
Set whether to use fancy math formatting.
If active, scientific notation is formatted as :math:`1.2 \times 10^3`.
Parameters
----------
val : bool or None
*None* resets to :rc:`axes.formatter.use_mathtext`.
Nzaxes.formatter.use_mathtextFr)Ú font_managerz font.family)Úfamily)Úfallback_to_defaultzfonts/ttf/cmr10.ttfzXcmr10 font should ideally be used with mathtext, set axes.formatter.use_mathtext to True)
rsrtÚ
matplotlibrÚÚfindfontÚFontPropertiesÚ
ValueErrorÚstrrÚ_get_data_pathrÚ
warn_external)r+Úufonts r-zScalarFormatter.set_useMathText?ð ˆ;Ü #§ ¡ Ð-JÑ KˆDÔ Ø× Ñ  EÑ (×$×3Ü#&§<¡<°
Ñ#>ðð-2ð œC¤× 4Ñ 4Ð5JÓ KÓ×LõðMð*ð$!$ˆ øô !úsª:B%Â% B3Â2B3cóÊt|j«dk(ry||jz
d|jzz }t |«dkrd}|j |j |«S)zI
Return the format for tick value *x* at position *pos*.
rrkç$@ç:Œ0âŽyE>)r„roÚabsrÖ©r+rYrZÚxps r-r[zScalarFormatter.__call__bs[ô ˆty‰y>˜QÒ Øàd—kk/ c¨T×-BÑ-BÑ&BÑCˆ2w˜Š~ØØ×6°t·{±{ÀBÓ Gr/có$t|«|_y)z€
Turn scientific notation on or off.
See Also
--------
ScalarFormatter.set_powerlimits
N)Úboolr±)r+Úbs r-Úset_scientificzScalarFormatter.set_scientificnsô  7ˆÕr/cóDt|«dk7r td«||_y)a
Set size thresholds for scientific notation.
Parameters
----------
lims : (int, int)
A tuple *(min_exp, max_exp)* containing the powers of 10 that
determine the switchover threshold. For a number representable as
:math:`a \times 10^\mathrm{exp}` with :math:`1 <= |a| < 10`,
scientific notation will be used if ``exp <= min_exp`` or
``exp >= max_exp``.
The default limits are controlled by :rc:`axes.formatter.limits`.
In particular numbers with *exp* equal to the thresholds are
written in scientific notation.
Typically, *min_exp* will be negative and *max_exp* will be
positive.
For example, ``formatter.set_powerlimits((-3, 4))`` will provide
the following formatting:
:math:`1 \times 10^{-3}, 9.9 \times 10^{-3}, 0.01,`
:math:`9999, 1 \times 10^4`.
See Also
--------
ScalarFormatter.set_scientific
éz%'lims' must be a sequence of length 2N)r„)r+Úlimss r-Úset_powerlimitszScalarFormatter.set_powerlimitsxs#ô< ˆt9˜Š>ÜÐ  ˆÕr/cóH|tjjuryt|t«rd}n`t |j dd«dvr|j jdk(ri|j jj«}|j«}|j|df«}|j|ddgddggz«dddf}nh|j jj«}|j«}|jd|f«}|j|ddgddggz«dddf}t||z
«j«}n%|j j«\}} | |z
d z }d
t!j"||«d }|j%||«S) Nrkú%drH)ÚxaxisÚyaxisrõréÿÿÿÿr'çˆÃ@z%-#.Úg)ÚnpÚmaÚmaskedÚ
isinstancerÚgetattrrMrHÚaxesÚget_xaxis_transformÚinvertedÚ transformÚget_yaxis_transformrèÚmaxr4rÚ
_g_sig_digitsrÖ)
r+rar—Úaxis_trfÚ axis_inv_trfÚ screen_xyÚneighbor_valuesÚdeltaÚarís
r-rhz!ScalarFormatter.format_data_shortšà ”B—E‘E—L‘LÑ ØÜ eœXÔ ŠCät—yy *¨bÓ1Ð5GÒ—9‘9×Ò#Ÿy™yŸ~™~×CHØ#+×#4Ñ#4Ó#6LØ (× 2Ñ 2°E¸1°:Ó >IØ&2×&<Ñ&<Ø! b¨! W¨r°1¨gÐ$6Ñ'8Ú89¸1¸ñ'> $Ÿy™yŸ~™~×CHØ#+×#4Ñ#4Ó#6LØ (× 2Ñ 2°A°u°:Ó >IØ&2×&<Ñ&<Ø!  W¨q°"¨gÐ$6Ñ'8Ú89¸1¸ñ'>˜O¨eÑ4×:‘ð—y‘y×4‘˜Q™ #™
Øœ×,¨U°EÓ;¸1Ð=ˆ×2°3¸Ó>r/cóVtjtjt|«««}t |d|zz d«}|j |dzdk(rdnd|«}|dk(r|S|j d|«}|j s |jrd|z}|dk(r|S|d|S|d|S) Né
r'rz%1.10gz10^{%s}z \times Úe)ÚmathÚfloorÚlog10rèÚroundrÖr¸)r+rarrvÚ significandÚexponents r-rezScalarFormatter.format_data¶ä J‰J”t—z‘z¤# e£*Ó .ˆÜ %˜"˜a™%‘- Ó $ˆØ×˜‘E˜Q’J‰D H¨aó à Š6ØÐ Ø×6°t¸QÓØ × Ò  § ¢ Ø  8Ñ+ˆHØ ! Q¢
(˜°(°Ð
"] ! H  .r/có(t|j«dk(ry|js |jrád}d}|jr/|j |j«}|jdkDrd|z}|jrF|j
s |j r|j d|jz«}nd|jz}|j s |j
r|dk7rd|z}d|d|d }ndj||f«}|j|«Sy)
z:
Return scientific notation, plus offset.
rrkú+r
z1e%dz\times\mathdefault{%s}ú$z
\mathdefault{z}$) r„rorer¸rw©r+Ú offsetStrÚ sciNotStrrvs r-rlzScalarFormatter.get_offsetÆô ˆty‰y‹>˜QÒ ØØ × Ò  D§K¢K؈I؈IØ{Š{Ø ×,¨T¯[©[Ó9 Ø—;‘; ’?Ø # i¡×—<< 4×#4Ò#4Ø $× 0Ñ 0°°t×7LÑ7LÑ1LÓ MIà &¨×)>Ñ)>Ñ >× Ò  D§L¢LØ ’?Ø 9¸IÑ E˜˜  >°)°¸CÐ@‘à—GG˜Y¨ Ð3Ø—>>  r/có¼||_t|j«dkDr=|jr|j«|j «|j «yy)Nr)ror„Ú_compute_offsetÚ_set_order_of_magnitudeÚ _set_formatrps r-r]zScalarFormatter.set_locsásIàˆŒ Ü ˆty‰y‹>˜AÒ ØŠØ× × × Ñ Õ ð r/có‚
|j}t|jj««\}}t j
|«}|||k||kz}t
|«sd|_y|j«|j«}}||k(s|dcxkr |krd|_ynd|_yttt|««tt|««g«\Š Š
tjd|«}t jtj
««}dt!ˆ
ˆ fdt#j$|d«D««z}
z
d|zz dkr,dt!ˆ
ˆ fdt#j$|d«D««z}|j&dz
} ‰
d|zzd| zk\r|
d|zzzd|zz|_yd|_y)Nrr'c3óDK|]}d|zzd|zzk7r|Œy­w)r
NrE©ÚoomÚabs_maxÚabs_mins €€r-z2ScalarFormatter._compute_offset.<locals>.<genexpr>s4øèø€òH˜! R¨3¡YÑ.°'¸RÀ3¹YÑ2FÒñHùsƒ r
ç{®Gáz„?c3óJK|]}d|zzd|zzz
dkDr|Œy­w)r
r'NrEr!s €€r-z2ScalarFormatter._compute_offset.<locals>.<genexpr> s9øèø€òO 3بs©Ñ2°WÀÀcÁ Ñ5IÑIÈAÒñOùsƒ #)roÚsortedrMr4Úasarrayr„ÚminrÚfloatrÚcopysignÚceilrÚnextÚ itertoolsÚcountr¬) r+ror8r9ÚlminÚlmaxÚsignÚoom_maxr"Únr#r$s @@r-rzScalarFormatter._compute_offsetêù€Øy‰yˆä˜DŸI™I×:‰
ˆˆdÜz‰z˜$ÓˆØT˜T‘\ d¨d¡lÑÜ4Œy؈DŒKØ Ø—X‘X“Z §¡£ˆdˆð 4Š<˜4 1ÔÒˆDŒKØ ñˆDŒKØ ô"¤3¤u¨T£{Ó#3´¸Ó5EÐ"FÓˆÜ}‰}˜Q Óô
—''œ$Ÿ*™* .ˆØ”$ôH¤i§o¡o°g¸rÓ&BôHóHñHˆà    s¡Ñ *¨dÒ
”dôO¬)¯/©/¸'À2Ó*FôOóOñOˆ
× "  &ˆà! R¨3¡YÑ.°"°a±%Ò˜w¨"°©)Ñ4°r¸S±yÑ àð
r/có|jsd|_y|jd|jdcxk(rdk7rnn|jd|_yt|jj ««\}}t
j|j«}|||k||kz}t
j|«}t|«sd|_y|jr,tjtj||z
««}n@|j«}|dk(rd}n(tjtj|««}||jdkr||_y||jdk\r||_yd|_y©Nrr')r'rMr4r(ror„rrrr)r+r8r9ror"s r-rz'ScalarFormatter._set_order_of_magnitudesAð×ÒØ$%ˆDÔ Ø × Ñ ˜QÑ  4×#4Ñ#4°QÑ#7Ô <¸ <à$(×$5Ñ$5°aÑ$8ˆ ä˜DŸI™I×:‰
ˆˆdÜz‰z˜$Ÿ)™)ÓØT˜T‘\ d¨d¡lÑ4ˆÜv‰vd‹|ˆÜ4ŒyØ$%ˆDÔ Ø ;Š;Ü—*‘*œTŸZ™Z¨¨t© Ó5‰Cà—(‘(“*ˆCØaŠxØä—j‘j¤§¡¨C£Ó1Ø $×#  &Ø$'ˆ
D×% 
(Ø$'ˆ !à$%ˆ !r/cóxt|j«dkr)g|j¢|jj«¢}n |j}t j
|«|j z
d|jzz }t j|«}|dk(r(t jt j|««}|dk(rd}t|j«dkr|dd}ttjtj|«««}tdd|z
«}dd|zz}|dk\rKt j|t j||¬ «z
«j«|kr|dz}nn|dk\rŒK|dz
}d
|d |_|j"s |j$rd |j z|_yy)
Nrðrr'éþÿÿÿéçü©ñÒMbP?r
)Údecimalsz%1.Ú$\mathdefault{%s}$)r„rorMr4r(ÚptprÚintrrrrr¸)r+Ú_locsroÚ loc_rangeÚ
loc_range_oomÚsigfigsÚthreshs r-rzScalarFormatter._set_format3stä ˆty‰y>˜ à@d—i@ $§)¡)×"=Ñ"=Ó"?Ð@‰Eà—IIˆ
˜! D§K¡KÑ/°3¸$×:OÑ:OÑ3OÑÜ—FF˜4“Lˆ à ˜Š>ÜŸœrŸv™v d,ˆIà ˜Š>؈ ˆty‰y>˜AÒ à˜˜9ˆDÜœDŸJ™J¤t§z¡z°)Ó'<Ó>ˆ
ä˜]Ñà˜˜mÑØ˜ŠlÜv‰vdœRŸX™X d°WÔ>×DÀvÒ˜1‘ à𠘋lð
1‰ ˆØ˜G˜9 &ˆŒ Ø <Š<˜4×/°$·+±+Ñ=ˆD-r/)NNNr1)rHrIrJr{r.Úpropertyrªr­r´r[rhrerlr]rrrrEr/r-rrñ4ðl
ô
ò˜:¨JÔ
7€Fò ò ñD˜m°-Ô@€Iòò ˜m°-Ô@€Iò  ò$ñB °oÔF€Kó
Hò !òD?ò8ò6ò%òN &óD>r/rcóReZdZdZ d dZdZdZd
dZdZd
dZ d „Z
d
Z d Z y)r
Base class for formatting ticks on a log or symlog scale.
It may be instantiated directly, or subclassed.
Parameters
----------
base : float, default: 10.
Base of the logarithm used in all calculations.
labelOnlyBase : bool, 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), 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, 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)``.
Ncó¦|j|«|j|«|tjdrd}nd}||_d|_||_y)_internal.classic_mode©rr)r'gš™™™™™Ù?)Úset_baseÚset_label_minorrsrtÚminor_thresholdsÚ
_sublabelsÚ
_linthresh)r+ÚbaseÚ
labelOnlyBaserLÚ linthreshs r-r.zLogFormatter.__init__sSð
Ø ×ј]Ô Ð |‰|Ð5Ø#)Ñ à#+Ð Ø 0ˆÔ؈ŒØr/có$t|«|_y)
Change the *base* for labeling.
.. warning::
Should always match the base used for :class:`LogLocator`
N)r*Ú_base)r+rOs r-rJzLogFormatter.set_basežsô˜4“[ˆ
r/có||_y)
Switch minor tick labeling on or off.
Parameters
----------
labelOnlyBase : bool
If True, label ticks only at integer powers of base.
rP)r+rPs r-rKzLogFormatter.set_label_minor§s ð+ˆÕr/có|tj|jd«rd|_y|j}|€% |j
j
«j}|j
j«\}}||kDr||}}||dkr dh|_y|j}|‰d}|| kr>t|| «}|tj||z «tj|«z z
}||kDr¢t||«}|tj||z «tj|«z z
}ndtj|«tj|«z }tj|«tj|«z }t||z
«}||jdkDr dh|_y||jdkDrJtj d|t#|«dzdz«} t%tj&| ««|_yt%tj(d|dz««|_y#t$rYŒÜwxYw)z
Use axis view limits to control which ticks are labeled.
The *locs* parameter is ignored in the present algorithm.
rNr')ÚisinfrLrMrNrMÚ
get_transformrQÚAttributeErrorr4rSr)rÚlogrÚ geomspacer?ÚsetrÚarange)
r+rorQr8r9ÚnumdecÚrhsÚlhsÚcs
r-r]zLogFormatter.set_locs²ô 8‰8D×)¨!Ñ "ˆDŒOØ ð—OOˆ Ø Ð ð
Ø ŸI™I×? ð—Y2‰
ˆˆdØ $Š;ؘt$ˆDà Ð  ¨¢ð !˜cˆDŒOØ à J‰JˆØ Ð ðˆFØy ܘ$  
Ó+Øœ$Ÿ(™( 4¨#¡:Ó·±¸Ñ<ØÜ˜$  Ó*Øœ$Ÿ(™( 4¨#¡:Ó·±¸Ñ<ä—88˜D“>¤D§H¡H¨Q£KÑ/ˆ—88˜D“>¤D§H¡H¨Q£KÑ/ˆDܘ Ó%ˆFà )¨!Ñ  ˜cˆD
d×+¨AÑ
 ˜Q ¤3 q£6¨1¡9¨q¡=Ó1ˆ!¤"§(¡(¨1£+Ó.ˆD"¤"§)¡)¨A¨q°1©uÓ"5Ó6ˆDOøôU
Úð
úsº$H.È. H;È:H;cóPd|cxkrdkrnn|j|||z
«S|dS)Nr'é'z1.0e)Ú _pprint_val)r+rYr8r9s r-Ú_num_to_stringzLogFormatter._num_to_stringís,Ø34¸´?¸Uµ?ˆt×Ñ  4¨$¡;ÓSÈ1ÈTÈ(ÐSr/có|dk(ryt|«}|j}tj|«tj|«z }t |«}|r t |«nt
j|«}t |||z
z«}|jr|sy|j||jvry|jj«\}} tj|| d¬«\}} |j||| «}
|j|
«S)Ú0rkçš™™™™™©?©Úexpander)rSrrZÚ_is_close_to_intrrrPrMrMr4Ú mtransformsÚ nonsingularrerw) r+rYrZÚfxÚ is_x_decaderÚcoeffr8r9rvs r-r[zLogFormatter.__call__ðà Š8Øä ‹FˆØ J‰Jˆä
X‰Xa[œ4Ÿ8™8 A
&ˆÜ& *ˆ Ù +”5˜”9´·±¸"³ˆÜa˜B ™MÑà × Ò ¡kØØ ?‰?Ð &¨5¸¿¹Ñ+GØà—Y‘Y×2‰
ˆˆdÜ ×,¨T°4À$ÔG‰
ˆˆdØ × Ñ   4¨Ó Ø~‰~˜aÓ Ð r/có¤tj|d¬«5tj|j|««cddd«S#1swYyxYw)NFrU)rÚ _setattr_cmÚ
strip_mathr[rds r-rezLogFormatter.format_datas>Ü
×
Ñ
˜t°5Ô
×# D§M¡M°%Ó$8Ó :ús ˜$AÁAcó(d|zj«S)Nz%-12g)Úrstriprds r-rhzLogFormatter.format_data_short sà˜%×)r/cóŒt|«dkr|t|«k(rd|zS|dkrdn|dkrdn|dkrdn|d krd
nd }||z}|jd «}t|«d
k(r@|dj d«j d«}t|d«}|r d||fz}|S|}|S|j d«j d«}|S)Nrør%z%1.3er'z%1.3fr
z%1.2fgjø@z%1.1fz%1.1errrhú.z%se%d)r?r„rv)r+rYÚdr—rvÚtupÚmantissars r-rdzLogFormatter._pprint_valä ˆq6CŠ<˜A¤ Q£šKؘ!‘8ˆ˜dš(‰wؘqš&‰wؘrš'‰wؘsš(‰wØð ð
!‰GˆØg‰gc‹lˆÜ ˆs‹8qŠ=ؘ1‘v—}‘} SÓÓ5ˆHܘ3˜q™6“{ˆHÙØ˜x¨Ð2ð
ˆððˆð˜
×$ )ˆˆr/)FNNr1)
rHrIrJr{r.rJrKr]rer[rerhrdrEr/r-rrUsBñ7ðr16Ø"&Øó
 97òvTó!ò.r/rcóeZdZdZdZy)rúJ
Format values for log axis using ``exponent = log_base(value)``.
có>tj|«tj|j«z }dt|«cxkrdkrOnnLtj||z
«tj|j«z }|j ||«}|S|d}|S)Nr'rcz1.0g)rrZrSrd)r+rYr8r9roÚfdrvs r-rez#LogFormatterExponent._num_to_string+sÜ
X‰Xa[œ4Ÿ8™8 D§J¡JÓ
Ø B“Ô ˜5Õ Ü˜$ ™+Ó¯©°$·*±*Ó)=Ñ=ˆBØ× Ñ   RÓ(ˆAðˆðd)ˆˆr/N)rHrIrJr{rerEr/r-rr&s ñór/rcóeZdZdZdZddZy)rr}cód|||fzS)ú'Return string for non-decade locations.z$\mathdefault{%s%s^{%.2f}}$rE)r+Ú sign_stringrOros r-Ú_non_decade_formatz'LogFormatterMathtext._non_decade_format:sà¸dÀBÐ0GÑGr/Ncób|dk(ry|dkrdnd}t|«}|j}tj|«tj|«z }t |«}|r t |«nt
j|«}t |||z
z«}|jr|sy|j||jvry|r t |«}|dzdk(rd|z} nd|z} t|«tjd krd
||fzS|s'tjd }
|j|| ||
«Sd || |fzS)
Nrz$\mathdefault{0}$rrrkr'rgz%szaxes.formatter.min_exponentz$\mathdefault{%s%g}$r»z$\mathdefault{%s%s^{%d}}$)
rSrrZrlrrrPrMrsrtr„) r+rYrZrorprrqrOs r-r[zLogFormatterMathtext.__call__>s*à Š6Ø šU‘c¨ˆ Ü ‹FˆØ J‰JˆôX‰Xa[œ4Ÿ8™8 A
&ˆÜ& *ˆ Ù +”5˜”9´·±¸"³ˆÜa˜B ™MÑà × Ò ¡kØØ ?‰?Ð &¨5¸¿¹Ñ+GØá Ür“ˆBð
ˆq‰5CŠ<ؘ!8‰Dà˜!8ˆ ˆr7”S—\\Ð"?Ñ *¨k¸1Ð-=Ñ Ü—\‘\ -Ñ0ˆFØ×*¨;¸¸bÀ&Ó /°;ÀÀbÐ2IÑ Ir/r1)rHrIrJr{r„r[rEr/r-rr5sñòHô#Jr/rcóeZdZdZdZy)rzL
Format values following scientific notation in a logarithmic axis.
cót|«}tj|«}|||z
z}t|«r t |«}d||||fzS)rz!$\mathdefault{%s%g\times%s^{%d}}$)r*rrrlr)r+rOrorrqs r-r„z*LogFormatterSciNotation._non_decade_formatisPä $KˆÜ—:‘:˜b“>ˆØb˜8$ˆÜ ˜EÔ ˜%“LˆEؘE Ð 3r/N)rHrIrJr{r„rEr/r-rrds ñó3r/rcó^eZdZdZddddddœdZdZd „Zd
Zd Zd Z dd
Z
dZ ddZ dZ
y)rz2
Probability formatter (using Math text).
Fz \frac{1}{2}éé)Ú use_overlineÚone_halfÚminorÚminor_thresholdÚ minor_numbercóh||_||_||_t«|_||_||_y)a×
Parameters
----------
use_overline : bool, default: False
If x > 1/2, with x = 1 - v, indicate if x should be displayed as
$\overline{v}$. The default is to display $1 - v$.
one_half : str, default: r"\\frac{1}{2}"
The string used to represent 1/2.
minor : bool, default: False
Indicate if the formatter is formatting minor ticks or not.
Basically minor ticks are not labelled, except when only few ticks
are provided, ticks with most space with neighbor ticks are
labelled. See other parameters to change the default behavior.
minor_threshold : int, default: 25
Maximum number of locs for labelling some minor ticks. This
parameter have no effect if minor is False.
minor_number : int, default: 6
Number of ticks which are labelled when the number of ticks is
below the threshold.
N)Ú
_use_overlineÚ _one_halfÚ_minorr\Ú _labelledÚ_minor_thresholdÚ
_minor_number)r+rrrs r-r.zLogitFormatter.__init__ys4ðBÔØŒØˆŒ ܈ŒØ /ˆÔØÕr/có||_y)a
Switch display mode with overline for labelling p>1/2.
Parameters
----------
use_overline : bool
If x > 1/2, with x = 1 - v, indicate if x should be displayed as
$\overline{v}$. The default is to display $1 - v$.
r)r+rs r-rzLogitFormatter.use_overline¡s ð*ˆÕr/có||_y)zz
Set the way one half is displayed.
one_half : str
The string used to represent 1/2.
N)r)r+s r-Ú set_one_halfzLogitFormatter.set_one_half­s ð"ˆr/có||_y)a 
Set the threshold for labelling minors ticks.
Parameters
----------
minor_threshold : int
Maximum number of locations for labelling some minor ticks. This
parameter have no effect if minor is False.
N)r•)r+s r-Úset_minor_thresholdz"LogitFormatter.set_minor_threshold¶s ð!0ˆÕr/có||_y)a
Set the number of minor ticks to label when some minor ticks are
labelled.
Parameters
----------
minor_number : int
Number of ticks which are labelled when the number of ticks is
below the threshold.
N)r)r+rs r-Úset_minor_numberzLogitFormatter.set_minor_numberÂs ð*ˆÕr/có˜tj«|_|jj «|j
syt
dD««ryt«|jkrZt«|jkr|jj«ytjtjd|jz dz
« «}tjtjtjf|f«tj|tjff««Štjd|f«tj|df«zŠt!t#t|j««ˆˆfd¬«|j d}|jjˆfd|D««yy)Nc3óÆK|]Y}t|d¬«xsFtd|z
d¬«xs4td|z«xr$ttjd|z««dk(Œ[y­w)çH¯¼šò×z>©Úrtolr'N)Ú
_is_decaderlr?r)rYs r-z*LogitFormatter.set_locs.<locals>.<genexpr>Õshèø€ò
ð
ô
q˜ 
˜!˜a™% 
   Ó”B—HH˜Q ™U“OÓÑ

ùsAA!r'rGcó||fSr1rE)r`Úspace_pessimisticÚ space_sums €€r-ú<lambda>z)LogitFormatter.set_locs.<locals>.<lambda>õsø€Ð#4°QÑ#7¸À1¹Ð"F€r/)Úkeyc3ó(K|] }|Œ y­wr1rE)r`ros €r-z*LogitFormatter.set_locs.<locals>.<genexpr>÷søèø€Ò%B°! d¨1¥gÑ%Bùsƒ)Úarrayror”Úclearr“Úallr„r•rÚupdateÚdiffrZÚminimumÚ concatenateÚinfr'Úrange)r+roÚ
good_minorr¦s ` @@r-r]zLogitFormatter.set_locsÏsdú€Ü—H‘H˜T“NˆŒ Ø ×ÑÔà{Š{ØÜ ñ
ð
ô 
ô
ðÜ ˆt‹9 4‹y˜4××% dÕ—w‘w¤§¡ q¨4¯9©9¡}°qÑ'8Ó 9Ð:Ü$&§J¡JÜ—NN¤R§V¡V I¨tÐ#4Ó—NN D¬2¯6©6¨)Ð#4Ó%Ð
—NN D¨$ —nn d¨D ôœ#˜dŸi™i›.Óð×(
ð×%Ó%B°zÔ%BÕBð3 -r/cóØ|r+tjtj|««}d}nd}d}|d| zz}t |«dkr|}nŒtj
tj ||z
««d}tj|« |z}t|«rttj|««ntj|«}||kr|}d||fz} |s| Sd| |fz}
|
S)Nrr'r
z%.*fz%s\cdot10^{%d}) rrrr„Úsortrèrlr?rr,) r+rYroÚ sci_notationrÚ
min_precisionraÚ precisionr¯r{rvs r-Ú
_format_valuezLogitFormatter._format_valueùÙ Ü—z‘z¤"§(¡(¨1£+Ó.ˆ‰MàˆH؈MØB˜H˜9ÑÜ ˆt‹9qŠ=Ø%‰Iä—7‘7œ2Ÿ6™6 $¨¡(Ó,¨QÑ/ˆDÜŸ $›˜¨(Ñ2ˆIô$ IÔ”B—HH˜—YY˜
ð
˜=Ò) ؘi¨ÐÙØˆOØ  ¨8Ð 4Ñ Øˆr/có.|jrd|zSd|S)Nz
\overline{%s}ú1-r˜)r+rvs r-Ú
_one_minuszLogitFormatter._one_minuss!Ø × Ò Ø#  ˜s8ˆOr/NcóÈ|jr||jvry|dks|dk\rytd|z«r"td|z«dk(r|j}d
|zS|dkr5t |d¬«r(tt
j|««}d|z}d
|zS|dkDrJt d|z
d¬«r:tt
jd|z
««}|jd|z«}d
|zS|d kr!|j||j«}d
|zS|d
kDr6|j|jd|z
d|jz
««}d
|zS|j||jd ¬ «}d
|zS)Nrkrr'çà?r¡z10^{%d}çš™™™™™¹?çÍÌÌÌÌÌì?F)r=) r“r”rlrrrrro)r+rYrZrvrs r-r[zLogitFormatter.__call__sqØ ;Š;˜1 D§N¡NÑØ Š6Q˜!Ü ˜A ™EÔ "¤u¨Q°©U£|°qÒ'8؈% ŠWœ A¨DÕœTŸZ™Z¨›]Ó+ˆHؘHÑ$ˆAð% qÑŠWœ A¨¡E°ÕœTŸZ™Z¨¨A©Ó/ˆHØ  ¨HÑ 4Ó5ˆAð% 
ŠWØ×" 1 d§i¡iÓ0ˆ
% ŠWØ × 2Ñ 2°1°Q±3¸¸$¿)¹)¹ Ó DÓEˆAð% ×" 1 d§i¡i¸Dˆ$ (r/có8|dkr|dS|dkr|dSdd|z
dS)NrÀrr<r'rErds r-rhz LogitFormatter.format_data_short.s9ð 3Š;ؘA Ø 3Š;ؘA ØA˜I˜a!r/)Tr1)rHrIrJr{r.rr]r[rhrEr/r-rrtsMñðØØØØô&*òP

 (CóTò4ó )ó*"r/rcóÆeZdZdZidddddddd “d
d d d
ddddddddddddddddddd d!“d"d#“d$d%d&d'd(œ¥Zd2d)d)d*d+œˆfd,„ Zd3d-„Zd.„Zd/„Zd0„Z d1„Z
ˆxZ S)4r
Format axis values using engineering prefixes to represent powers
of 1000, plus a specified unit, e.g., 10 MHz instead of 1e7.
iâÿÿÿÚqiåÿÿÿÚrièÿÿÿÚyiëÿÿÿÚziîÿÿÿr iñÿÿÿr<iôÿÿÿÚpi÷ÿÿÿr4iúÿÿÿõµéýÿÿÿÚmrrkr9ÚkrŠÚMrDÚ ÚÚÚQ)ééééNF)r´cóV||_||_||_t|||d|¬«y)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: :rc:`text.usetex`
To enable/disable the use of TeX's math mode for rendering the
numbers in the formatter.
useMathText : bool, default: :rc:`axes.formatter.use_mathtext`
To enable/disable the use mathtext for rendering the numbers in
the formatter.
useOffset : bool or float, default: False
Whether to use offset notation with :math:`10^{3*N}` based prefixes.
This features allows showing an offset with standard SI order of
magnitude prefix near the axis. Offset is computed similarly to
how `ScalarFormatter` computes it internally, but here you are
guaranteed to get an offset which will make the tick labels exceed
3 digits. See also `.set_useOffset`.
.. versionadded:: 3.10
F)r´N)ÚunitÚplacesÚseprŸr.)r+s €r-r.zEngFormatter.__init__Ws9ø€ðZˆŒ ؈Œ ؈ŒÜ
ÑØØØð õ
r/có&t|j«dk(s|jdk(r |j|j |««S||jz
d|j
zz }t
|«dkrd}|j|j|«S)
Return the format for tick value *x* at position *pos*.
If there is no currently offset in the data, it returns the best
engineering formatting that fits the given argument, independently.
r) r„rorwres r-r[zEngFormatter.__call__Žs}ô ˆty‰y>˜  $§+¡+°Ò"2Ø—>> $×"2Ñ"2°1Ó"5Ó d—kk/ c¨T×-BÑ-BÑ&BÑCˆ2w˜Š~ØØ×6°t·{±{ÀBÓ Gr/cóœ||_t|j«dkDr­t|jj ««\}}|j
r6|j
«|jdk7rt||zdz d«|_tjtj||z
d««dz|_ |j«yy)Nrr9éè)ror„r'rMr4rrrrrZr)r+ror8r9s r-r]zEngFormatter.set_locsàˆŒ Ü ˆty‰y‹>˜AÒ Ü § ¡ × ;Ñ ;Ó =Ó>‰JˆDШח;; #(¨°©°a©¸Ó";D”Kä$(§J¡J¬t¯x©x¸¸ ÀTÓ/JÓ$KÈAÑ$MˆDÔ × Ñ Õ ð r/có†t|j«dk(ry|jrœd}|jr/|j|j«}|jdkDrd|z}|jd|jz«}|j
s |j r|dk7rd|z}d||d}n||z}|j|«Sy)Nrrkrr
z\times%sr)r„rorer¸rwrs r-rlzEngFormatter.get_offset¶ä ˆty‰y‹>˜QÒ ØØ ;Š;؈IØ{Š{Ø ×,¨T¯[©[Ó9 Ø—;‘; ’?Ø # i¡×¨t×/DÑ/DÑ)DÓEˆIØ× Ò  D§L¢LØ ’?Ø +¨iÑ 7˜ { 9 +¨QÐ/à  Ñ)Ø—>>  r/có$|j|«S)z!Alias to EngFormatter.format_datarg)r+Únums r-Ú
format_engzEngFormatter.format_engÊsà×Ñ Ó$r/cóÖd}|jdnd|jdd}|dkrd}| }|dk7r8ttjtj|«dz «dz«}nd}d }t j |t|j«t|j««}||zd
|zz }ttt||«««d k\r"|t|j«kr
|d z}|dz
}|jt|«}|js|r|j||j}nd }|js |j r d
||d d
|S||d |S)u{
Format a number in engineering notation, appending a letter
representing the power of 1000 of the original number.
Some examples:
>>> format_data(0) # for self.places = 0
'0'
>>> format_data(1000000) # for self.places = 1
'1.0 M'
>>> format_data(-1e-6) # for self.places = 2
'-1.00 µ'
r'rxryr<rr9rgrkr)r?rrrÚclipr)Ú ENG_PREFIXESrr*r¸)r+rar2r—Úpow10ÚmantÚ unit_prefixÚsuffixs r-rezEngFormatter.format_dataÎskðˆØ—[‘[Ð(‰c°°$·+±+¸a°ÀÐ.Bˆà 1Š9؈DØFˆEà AŠ:ÜœŸ
¤4§:¡:¨eÓ#4°qÑ#8Ó9¸>‰EàˆEðˆE䘜s 4×#4Ñ#4Ó5´s¸4×;LÑ;LÓ7MÓNˆàe‰|˜t u™}Ñô
”f˜T  )¨TÒ œC × 1Ñ 1Ó D‰Lˆ Q‰Jˆ×¨E«
Ñ Ø 9Š9™ ØŸz + ¨t¯y©y¨kÐ:‰Fàˆ <Š<˜4×t˜S˜E ˜6l ! F  ˜C˜5 ˜&\ & Ð *r/)rk r1) rHrIrJr{r.r[r]rlres@r-rr8sø„ñð Ø ˆSðà ˆSðð ˆSðð ˆSð ð
ˆ ð ˆ
ð ˆð
ˆð
Ð
ðð
ˆSðð ˆRðð ˆSðð ˆSðð ˆSðð
ˆð
ˆSð!ð"
ˆSð#ð$Ø
Ø
Ø
ò+€Lð05
ÀØ!¨Uö5
ón
Hòò2ò(2+r/rcó`eZdZdZd dZd
dZdZdZed«Z e jd«Z y) 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 : str 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.
NcóB|dz|_||_||_||_y)Nrg)Úxmaxr;Ú_symbolÚ _is_latex)r+r;ÚsymbolÚis_latexs r-r.zPercentFormatter.__init__s"ؘ3JˆŒ Ø ˆŒ
؈Œ Ør/cóš|jj«\}}t||z
«}|j|j ||««S)z=Format the tick as a percentage with the appropriate scaling.)rMr4rwÚ
format_pct)r+rYrZÚax_minÚax_maxÚ
display_ranges r-r[zPercentFormatter.__call__#s@àŸ×6‰ˆÜ˜F V™OÓ
Ø~‰~˜dŸo™o¨a°Ó@r/cóB|j|«}|j€W|j|«}|dkrd}nJtjdtjd|z«z
«}|dkDrd}n|dkrd}n |j}|dt |«d}||j zS)a|
Format 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.
rçz0.r<)Úconvert_to_pctr;rr,rr?)r+rYÚ scaled_ranger;rvs r-zPercentFormatter.format_pct)ð,
× Ñ  Ó Ø =‰=Ð à×.¨}Ó=ˆLؘqÒ Øô  Ÿ9™9 S¬4¯:©:°c¸LÑ6HÓ+IÑ%IÓJؘa ‘HØ ’\Ø ‘Hà—}‘}ˆHØ”C˜“M? !Ðà4—;;‰Ðr/có&d||jz zS)NgY@))r+rYs r-rÿzPercentFormatter.convert_to_pctUsؘ˜DŸI™I™
Ñ&r/có |j}|sd}|S|js/tjdrdD]}|j |d|z«}Œ|S)
The configured percent symbol as a string.
If LaTeX is enabled via :rc:`text.usetex`, the special characters
``{'#', '$', '%', '&', '~', '_', '^', '\', '{', '}'}`` are
automatically escaped in the string.
rkz
\#$%&~_^{}ú\)rsrtru)r+Úspecs r-zPercentFormatter.symbolXsZðˆÙ؈Fðˆ
ð
¤C§L¡L°Ò$?ð
;ØŸ¨¨d°T©kÓ:‘ð
ˆ
r/có||_yr1))r+s r-zPercentFormatter.symbolls àˆ r/)éd%Fr1) rHrIrJr{r.r[rÿrEÚsetterrEr/r-rrsIñó2 Aò *òXñóðð& ‡]óñr/rcó8eZdZdZdZdZdZdZdZdZ dZ
y )
r
Determine 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.
cótd«)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 ``axis`` simply call
the Locator instance::
>>> print(type(loc))
<type 'Locator'>
>>> print(loc())
[1, 2, 3, 4]
rUrVr7s r-Ú tick_valueszLocator.tick_values€sô"Ð"9Ó:r/c óXtjdtt|««z«y)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ÚtyperPs r-Ú
set_paramszLocator.set_paramss%ô
×ÑØ T“

õ r/cótd«)ú"Return the locations of the ticks.rUrVr3s r-r[zLocator.__call__šsô"Ð"9Ó:r/cóšt|«|jk\r2tjdt|«|d|d|j«|S)
Log at WARNING level if *locs* is longer than `Locator.MAXTICKS`.
This is intended to be called immediately before returning *locs* from
``__call__`` to inform users in case their Locator returns a huge
number of ticks, causing Matplotlib to run out of memory.
The "strange" name of this method dates back to when it would raise an
exception instead of emitting a log.
z]Locator attempting to generate %s ticks ([%s, ..., %s]), which exceeds Locator.MAXTICKS (%s).r)r„ÚMAXTICKSÚ_logÚwarningrps r-Úraise_if_exceedszLocator.raise_if_exceeds sEô ˆtŸ
Ò L‰LðD“ ˜4 ™7 D¨¡H¨d¯m©mô
ˆ r/có2tj||d¬«S)a1
Adjust a range as needed to avoid singularities.
This method gets called during autoscaling, with ``(v0, v1)`` set to
the data limits on the Axes if the Axes contains any data, or
``(-inf, +inf)`` if not.
- If ``v0 == v1`` (possibly up to some floating point slop), this
method returns an expanded interval around this value.
- If ``(v0, v1) == (-inf, +inf)``, this method returns appropriate
default view limits.
- Otherwise, ``(v0, v1)`` is returned without modification.
rirj©rmrn)r+Úv0Úv1s r-rnzLocator.nonsingular²sô×& r¨2¸Ô<r/có.tj||«S)
Select a scale for the range from vmin to vmax.
Subclasses should override this method to change locator behaviour.
rr7s r-Ú view_limitszLocator.view_limitsÂsô ×& t¨TÓ2r/N) rHrIrJr{rr rr[rrnrrEr/r-rrqs,ñð€Hò;ò"ò ò$3r/rcó*eZdZdZdZddZdZdZy)r
Place ticks at every nth point plotted.
IndexLocator assumes index plotting; i.e., that the ticks are placed at integer
values in the range between 0 and len(data) inclusive.
có ||_||_y)z:Place ticks every *base* data point, starting at *offset*.N©rS©r+rOs r-r.zIndexLocator.__init__ÒsàˆŒ
؈ r/Ncó*|||_|||_yy)z"Set parameters within this locatorNrrs r-rzIndexLocator.set_params×s!à Р؈DŒJØ Ð Ø ˆD r/có`|jj«\}}|j||«S)z!Return the locations of the ticks)rMr@r ©r+ÚdminÚdmaxs r-r[zIndexLocator.__call__Þó+à—Y2‰
ˆˆdØ×Ñ  dÓ+r/có‚|jtj||jz|dz|j««S)Nr')rr]rSr7s r-r zIndexLocator.tick_valuesãs8Ø× I‰Id˜TŸ[™[Ñ(¨$°©(°D·J±JÓ Að Ar/©NN©rHrIrJr{r.rr[r rEr/r-rrËsñò ó

Ar/rcó,eZdZdZddZddZdZdZy)r
Place ticks at a set of fixed values.
If *nbins* is None ticks are placed at all values. Otherwise, the *locs* array of
possible positions will be subsampled to keep the number of ticks
:math:`\leq nbins + 1`. The subsampling will be done to include the smallest
absolute value; for example, if zero is included in the array of possibilities, then
it will be included in the chosen ticks.
Ncó°tj|«|_tjd|j¬«|t |d«|_yd|_y)Nr1rn)r(rorÚ check_shaperÚnbins)r+ror,s r-r.zFixedLocator.__init__ós>Ü—J‘J˜tÓŒ Ü ×ј t§y¡yÕ1Ø&+Ð&7”S˜ “]ˆ
¸Tˆ
r/có|||_yy©ú#Set parameters within this locator.N©r,)r+r,s r-rzFixedLocator.set_paramsøsà Р؈D r/có&|jdd«Sr1©r r3s r-r[zFixedLocator.__call__ýóØ×Ñ  dÓ+r/c óâ|j |jSttt j
t
|j«|jz ««d«}|jdd|}td|«D]^}|j|d|}t j|«j«t j|«j«ksŒ]|}Œ`|j|«S)
Return the locations of the ticks.
.. note::
Because the values are fixed, vmin and vmax are not used in this
method.
Nr') r,rorr?r,r„r)r)r+r8r9ÚstepÚticksr`Úticks1s r-r zFixedLocator.tick_valuesð :‰:Ð Ø—9‘9Ð Ü”3”r—w‘wœs 4§9¡9›~°·
±
Ñ<¸@ˆØ ™&˜D˜!ˆÜq˜$“ò ˆAØ—YY˜q˜w $˜'ˆv‰vf~×#¤b§f¡f¨U£m×&7Ñ&7Ó&9Óð ð×$ +r/r1r(rEr/r-rrèsñóBó
ò
,r/rcóeZdZdZdZdZy)rz
No ticks
có&|jdd«Sr1r2r3s r-r[zNullLocator.__call__r3r/cógS)
Return the locations of the ticks.
.. note::
Because the values are Null, vmin and vmax are not used in this
method.
rEr7s r-r zNullLocator.tick_valuess ðˆ r/N)rHrIrJr{r[r rEr/r-rrsñò r/rcófeZdZdZd
dZed«Zejd«Zd
dZdZ dZ
d „Z y) ra 
Place ticks at evenly spaced values.
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
Ncó4||_|i|_y||_y)ao
Parameters
----------
numticks : int or None, default None
Number of ticks. If None, *numticks* = 11.
presets : dict or None, default: None
Dictionary mapping ``(vmin, vmax)`` to an array of locations.
Overrides *numticks* if there is an entry for the current
``(vmin, vmax)``.
N)ÚnumticksÚpresets©r+r=r>s r-r.zLinearLocator.__init__3sð!ˆŒ
Ø ˆˆD"ˆDLr/có6|j |jSdS) ©Ú _numticksr3s r-r=zLinearLocator.numticksDsð"&§¡Ð!;ˆt~‰~ÐÐCr/có||_yr1rB)r+r=s r-r=zLinearLocator.numticksIs à!ˆr/có*|||_|||_yyr.)r>r=r?s r-rzLinearLocator.set_paramsMs!à Ð Ø"ˆDŒLØ Ð Ø$ˆD r/có`|jj«\}}|j||«S©r©rMr4r r7s r-r[zLinearLocator.__call__Tr%r/cótj||d¬«\}}||f|jvr|j||fS|jdk(rgSt j
|||j«}|j
|«S)Nrirjr)rmrnr>r=Úlinspacer)r+r8r9Úticklocss r-r zLinearLocator.tick_valuesYsuÜ ×,¨T°4À$ÔG‰
ˆˆ $ˆ<˜4Ÿ<™<Ñ —<<  t  Ñ =‰=˜AÒ ØˆIÜ—;‘;˜t T¨4¯=©=Óà×$ .r/c óÞ||kr||}}||k(r
|dz}|dz
}tjddk(rªttj||z
«tjt |j dz
d«««\}}||dkz}t |j dz
d«| z}tj||z«|z }tj||z«|z }tj||«S)ú,Try to choose the view limits intelligently.r'úaxes.autolimit_modeÚ
round_numbersr¿) rsrtÚdivmodrrrr=rr,rmrn)r+r8r9rÚ remainderÚscales r-rzLinearLocator.view_limitseð $Š;ؘt$ˆ 4Š<Ø A‰Iˆ A‰Iˆ <‰<Ð .°/Ò AÜ"(Ü
˜4 $™;Ó¯©´C¸¿
¹
ÈÑ8IÈ1Ó4MÓ)Nó#PÑ ˆH ˜ R™Ñ (ˆHܘŸ
¨Ñ)¨1Ó-°8°)Ñ<ˆ—::˜e d™lÓ+¨eÑ3ˆ—99˜U T™\Ó*¨UÑ2ˆ×& t¨TÓ2r/r') rHrIrJr{r.rEr=rrr[r rrEr/r-rr)sNñó#ð"ñDóðDð‡_ð
3r/rcó2eZdZdZddZd dZdZdZdZy)
rzI
Place ticks at every integer multiple of a base plus an offset.
có4t|d«|_||_y)
Parameters
----------
base : float > 0, default: 1.0
Interval between ticks.
offset : float, default: 0.0
Value added to each multiple of *base*.
.. versionadded:: 3.8
rÚ
_Edge_integerÚ_edgeÚ_offsetrs r-r.zMultipleLocator.__init__sô# ÓŒ
؈ r/Ncó>|t|d«|_|||_yy)a
Set parameters within this locator.
Parameters
----------
base : float > 0, optional
Interval between ticks.
offset : float, optional
Value added to each multiple of *base*.
.. versionadded:: 3.8
NrrUrs r-rzMultipleLocator.set_paramss*ð Ð Ü& t¨QÓ/ˆDŒJØ Ð Ø!ˆD r/có`|jj«\}}|j||«SrGrHr7s r-r[zMultipleLocator.__call__Ÿr%r/cóR||kr||}}|jj}||jz}||jz}|jj|«|z}||z
d|zz|z}||z
t j
|dz«|zz|jz}|j
|«S)Nr:r9)rWr5rXÚgerúr]r)r+r8r9r5r4ros r-r zMultipleLocator.tick_values¤Ø $Š;ؘt$ˆDØz‰zˆØ  ÑˆØ  шØz‰z}‰}˜" )ˆØ
D‰[˜5 4™<Ñ
'¨DÑ 0ˆØd‰{œRŸY™Y q¨1¡uÓÑ4°t·|±|ÑØ×$ *r/có²tjddk(r¨|jj||jz
«|jj
z|jz}|jj
||jz
«|jj
z|jz}||k(r|dz}|dz
}n|}|}tj||«S)zW
Set the view limits to the nearest tick values that contain the data.
rNrOr') rsrtrWÚlerXr5r\rmrn)r+r#r$r8r9s r-rzMultipleLocator.view_limits¯ô <‰<Ð .°/Ò —::—=‘= ¨¯ © Ñ!4Ó¿
¹
¿¹ÑGÈ$Ï,É,ÑVˆDØ—:‘:—=‘= ¨¯ © Ñ!4Ó¿
¹
¿¹ÑGÈ$Ï,É,ÑVˆDØtŠ|ؘؘ‘ ‘àˆD؈×& t¨TÓ2r/)çð?rgr'© rHrIrJr{r.rr[r rrEr/r-rrzs ñó ó"ò$
3r/rcó
t||z
«}||zdz }t|«|z |krd}n8tjdtjt|««dzz|«}dtj||z «dzz}||fS)Nrðrr
r')rr+r)r8r9r4Ú thresholdÚdvÚmeanvrÅrRs r-Ú scale_rangereÀs€Ü ˆTD‰[Ó €BØ
D‰[˜ €EÜ
ˆ5ƒzB˜Òä˜r¤d§j¡j´°U³Ó&<ÀÑ&AÑBÀEÓJˆØ ”4—:‘:˜b 1™fÓÑ +€EØ &ˆr/có(eZdZdZdZdZdZdZy)rV
Helper for `.MaxNLocator`, `.MultipleLocator`, etc.
Take floating-point precision limitations into account when calculating
tick locations as integer multiples of a step.
cóR|dkr td«||_t|«|_y)
Parameters
----------
step : float > 0
Interval between ticks.
offset : float
Offset subtracted from the data limits prior to calculating tick
locations.
rz'step' must be positiveN)r5rX)r+r5s r-r.z_Edge_integer.__init__Òs)ð 1Š9ÜÐ ˆŒ ܘ6“{ˆ r/cóÜ|jdkDrKtj|j|jz «}t dd|dz
z«}t d|«}nd}t
||z
«|kS)Nrg»½×Ùß|Û=r
g<NÑ‘\þß?)rXrr5rr))r+ÚmsÚedgeÚdigitsÚtols r-Úclosetoz_Edge_integer.closetoásbà <‰<˜ Ü—XX˜dŸl™l¨T¯Y©YÑ7ˆFÜe˜R F¨R¡KÑ1ˆf˜"‰Càˆ2˜9~ Ñ#r/có€t||j«\}}|j||jz d«r|dzS|S)z"Return the largest n: n*step <= x.r'©rPr5rm©r+rYrys r-r^z_Edge_integer.leës:äŸÓ#‰ˆˆ1Ø <‰<˜˜DŸI™I™
 qÔ q5ˆˆr/có€t||j«\}}|j||jz d«r|S|dzS)z#Return the smallest n: n*step >= x.rr'rorps r-r\z_Edge_integer.geòs:äŸÓ#‰ˆˆ1Ø <‰<˜˜DŸI™I™
 qÔ ˆ1‰uˆ r/N)rHrIrJr{r.rmr^r\rEr/r-rVrVËsñò
ór/rVcóreZdZdZedddddd¬«ZddZed«Zed „«Z d
Z
d Z d Z d
Z
dZy)r
Place evenly spaced ticks, with a cap on the total number of ticks.
Finds nice tick locations with no more than :math:`nbins + 1` ticks being within the
view limits. Locations beyond the limits are added to support autoscaling.
r
NFrð)r,ÚstepsÚintegerÚ symmetricÚpruneÚ min_n_ticksc óR|||d<|jdii|j¥|¥¤Žy)aj
Parameters
----------
nbins : int or 'auto', 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 acceptable tick multiples, starting with 1 and
ending with 10. For example, if ``steps=[1, 2, 4, 5, 10]``,
``20, 40, 60`` or ``0.4, 0.6, 0.8`` would be possible
sets of ticks because they are multiples of 2.
``30, 60, 90`` would not be generated because 3 does not
appear in this example list of steps.
integer : bool, 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, default: False
If True, autoscaling will result in a range symmetric about zero.
prune : {'lower', 'upper', 'both', None}, default: None
Remove the 'lower' tick, the 'upper' tick, or ticks on 'both' sides
*if they fall exactly on an axis' edge* (this typically occurs when
:rc:`axes.autolimit_mode` is 'round_numbers'). Removing such ticks
is mostly useful for stacked or ganged plots, where the upper tick
of an Axes overlaps with the lower tick of the axes above it.
min_n_ticks : int, default: 2
Relax *nbins* and *integer* constraints if necessary to obtain
this minimum number of ticks.
Nr,rE)rÚdefault_params)r+r,rQs r-r.zMaxNLocator.__init__s6ðF Ð Ø#ˆF7‰O؈Ñ;˜T×;°FÐ<r/có|tj|«s td«tj|«}tjtj
|«dk«s|ddkDs|ddkr td«|ddk7rtj dg|g«}|ddk7rtj |dgg«}|S)NzSsteps argument must be an increasing sequence of numbers between 1 and 10 inclusiverr
r')Úiterableràr(Úanyr¯©rss r-Ú_validate_stepszMaxNLocator._validate_steps/ä{‰{˜ðEóFð
Fä
˜!ˆÜ
6‰6”"—''˜%“.  &¨%°©)°bª.¸EÀ!¹HÀqºLÜðEóFð
Fà ‰8qŠ=Ü—NN Q  0ˆ ‰9˜Š?Ü—N‘N E¨B¨4 1ˆˆ r/cóLtjd|ddz|d|dzgg«S)NrÀr
r')r}s r-Ú
_staircasezMaxNLocator._staircase>s/ô~‰~˜s U¨3¨B ZѸ¸eÀA¹h¹¸ÐIr/c ó¨d|vr?|jd«|_|jdk7rt|j«|_d|vr|jd«|_d|vr1|jd«}t j
gd¢|¬«||_d|vr td|jd««|_d |vrf|jd «}|tjgd ¢«|_ n|j|«|_ |j|j«|_d |vr|jd «|_|rt j d
|«y
)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,Úautorurv)ÚupperÚlowerÚbothN)rvrwr'rsN)
r'gø?rðç@r9éér
rtr)ÚpopÚ_nbinsr?Ú
_symmetricrÚ
check_in_listÚ_prunerÚ _min_n_ticksrúÚ_stepsr~r€Ú_extended_stepsÚ_integerÚ kwarg_error)r+rQrvrss r-rzMaxNLocator.set_paramsDs$ð&  Ø Ÿ*™* -ˆDŒKØ{‰{˜! $§+¡+Ó. Ø ˜ Ø$Ÿj™j¨Ó5ˆDŒOØ  Ø—J‘J˜wÓ'ˆEÜ × Ñ Ò?ÀuÕ ˆDŒKØ ˜ "Ü # A v§z¡z°-Ó'@Ó Aˆ Ø  Ø—J‘J˜wÓ'ˆˆ Ÿh™hÒ'JÓK à"×2°5Ó9 Ø#'§?¡?°4·;±;Ó#?ˆ Ø ˜Ñ Ø"ŸJ™J 1ˆDŒMÙ Ü×" Ó  r/có
|jdk(rV|jGtj|jj «t d|j dz
«d«}nd}n |j}t|||«\}}||z
}||z
}|j|z}|jr9|dktj|tj|«z
«dkz} || }||z
|z }
t|jd«r+|jjjdk(r|
dzd z }
||
k\} tj d
d k(r||z|z} | ||zz}
| |
|k\z} t#| «rtj$| «d d }nt'|«dz
}|d|dzddd
D}|jrGtj(|«tj*|«z
|j dz
k\r t d|«}||z|z}t-||«}|j/||z
«}|j1||z
«}tj2||dz«|z|z}||k||k\zj5«}||j k\sŒÚ||zS|zS)
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.
rNr'rDr:rÿÚ3dérNrOr)rMrFrrerrrÚhasattrrÿÚnamersrtr|Únonzeror„rr,rVr^r\r]Úsum)r+r8r9r,rRÚ_vminÚ_vmaxrsÚigoodÚraw_stepÚ large_stepsÚ
floored_vminsÚ
floored_vmaxsÚistepr5Ú best_vminrjÚlowÚhighr6Úntickss r-Ú
_raw_tickszMaxNLocator._raw_ticksos…ð ;‰;˜ Øy‰yП § ¡ × 8Ñ 8Ó :Ü # A t×'8Ñ'8¸1Ñ'<Ó =¸Bðà—K‘KˆEä# D¨$°Ó6‰
ˆˆv
ˆØv
ˆØ×$ uÑØ =Š=à˜QY¤2§6¡6¨%´"·(±(¸5³/Ñ*AÓ#BÀUÑ#JÑKˆ˜%LˆEà˜U‘] eÑÜ 4—99˜ %¨$¯)©)¯.©.×*=Ñ*=ÀÒ*Eð  "} 'ˆ˜'ˆ Ü <‰<Ð .°/Ò # e™^¨uÑ4ˆ)¨E°E©MÑ9ˆMظ%Ñ)?Ñ@ˆKô ˆ{Ô Ü—J‘J˜{Ó+¨AÑ.¨qÑ1‰E䘓J ‘NˆEð
˜(˜5 ™7O¡D b  ˆ
Ü—H‘H˜U“O¤b§g¡g¨e£nÑ4¸×8IÑ8IÈAÑ8MÒ˜1˜d“|Ø $™¨$Ñ.ˆIô !  .ˆ—''˜% ,ˆ—77˜5 -ˆ—II˜c 4¨!¡8Ó,¨tÑ3°iÑ?ˆEà ~¨%°5©.Ñ9×@ˆ˜×Øv‰~Ðð' ð&v‰~Ðr/có`|jj«\}}|j||«Sr1rHr7s r-r[zMaxNLocator.__call__´s+Ø—YY×2‰
ˆˆdØ×Ñ  dÓ+r/có2|jr!tt|«t|««}| }tj||dd¬«\}}|j ||«}|j }|dk(r|dd}n|dk(r|dd}n
|dk(r|dd}|j|«S) Nç‚vIhÂ%<=g+¡†›„rkÚtinyr„r'r…)rrrmrnrr)r+r8r9rorvs r-r zMaxNLocator.tick_values¸Ø ?Š?Ü”s˜4“y¤# d£)Ó,ˆDØ5ˆDÜ × ¨Uô4‰
ˆˆdà˜t TÓà ˆØ  ؘ˜8‰DØ

ؘ˜9‰DØ
fŠ_ؘ˜":ˆ×$ *r/cóö|jr!tt|«t|««}| }tj||dd¬«\}}t
j ddk(r|j||«ddgS||fS)Ngê-™—q=r©rNrOr)rrrmrnrsrtr"s r-rzMaxNLocator.view_limitsÉsyØ ?Š?Ü”s˜4“y¤# d£)Ó,ˆDØ5ˆDä × ¨Uô4‰
ˆˆ <‰<Ð .°/Ò —?? 4¨Ó°2¨wÑ ˜ r/r1)rHrIrJr{Údictryr.r|r~r€rr[r rrEr/r-rrúspññ  Ø $Ø"'Ø$)Ø $Ø&'ô )€Nó%=ðNñ óð ðñJóðJò
)9òVCòJ+ó" r/rr
)rOcóNtj|«sy|dk(rytjt|««tj|«z }|€)tj|tj
|««Stj|tj
|«|¬«S)z1Return True if *x* is an integer power of *base*.FrgTr¢)ÚisfiniterZÚiscloser)rYrOÚlxs r-×sqä
;‰;qŒ>ØØˆC‚xØÜ A“œ"Ÿ&™& ,Ñ &€BØ €|Üz‰z˜"œbŸh™h rz‰z˜"œbŸh™h rÔ6r/có¸|dk(r|S|dkrt| |« S|tjtj|«tj|«z «zS)
Return the largest integer power of *base* that's less or equal to *x*.
If *x* is negative, the exponent will be *greater*.
r)Ú_decade_greater_equalrúrrZ©rYrOs r-Ú_decade_less_equalrµäsXð a’ˆAð8Ø01°A²Ô
" A 2 
 ”B—H‘HœRŸV™V A›Y¬¯©°«Ñ 8r/có¸|dk(r|S|dkrt| |« S|tjtj|«tj|«z «zS)
Return the smallest integer power of *base* that's greater or equal to *x*.
If *x* is negative, the exponent will be *smaller*.
r)r,rZr´s r-ïsXð a’ˆAð7Ø-.°ªUÔ
   
 ”B—G‘GœBŸF™F 1›I¬¯©¨t« Ñ 7r/cóX|dkrt| |« St||«}||k(r||z}|S)
Return the largest integer power of *base* that's less than *x*.
If *x* is negative, the exponent will be *greater*.
r)Ú_decade_greaterrµ)rYrOÚlesss r-Ú _decade_lessrºús>ð  ˆ1   DÓ ˜a Ó &€DØ ˆq  ˆØ €Kr/cóX|dkrt| |« St||«}||k(r||z}|S)z‡
Return the smallest integer power of *base* that's greater than *x*.
If *x* is negative, the exponent will be *smaller*.
r))rYrOÚgreaters r-r¸r¸ s>ð  ˆ1˜a˜R Ó# A ,€GØ!4‰ˆØ €Nr/có@tj|t|««Sr1)rr©rYs r-rlrl sÜ <‰<˜œ5  $r/cóJeZdZdZd ddœdZd ddœdZdZdZdZd „Z d
Z
y)
rzd
Place logarithmically spaced ticks.
Places ticks at the values ``subs[j] * base**i``.
N)r=cóˆ|tjdrd}nd}t|«|_|j |«||_y)
Parameters
----------
base : float, default: 10.0
The base of the log used, so major ticks are placed at ``base**n``, where
``n`` is an integer.
subs : None or {'auto', 'all'} or sequence of float, default: (1.0,)
Gives the multiples of integer powers of the base at which to place ticks.
The default of ``(1.0, )`` places ticks only at integer powers of the base.
Permitted string values are ``'auto'`` and ``'all'``. Both of these use an
algorithm based on the axis view limits to determine whether and how to put
ticks between integer powers of the base:
- ``'auto'``: Ticks are placed only between integer powers.
- ``'all'``: Ticks are placed between *and* at integer powers.
- ``None``: Equivalent to ``'auto'``.
numticks : None or int, default: None
The maximum number of ticks to allow on a given axis. The default of
``None`` will try to choose intelligently as long as this Locator has
already been assigned to an axis using `~.axis.Axis.get_tick_space`, but
otherwise falls back to 9.
NrHr)rsrtr*rSÚ _set_subsr=©r+rOÚsubsr=s r-r.zLogLocator.__init__! s?ð, Ð Ü|‰|Ðà!ܘ4“[ˆŒ
Ø Ø ˆ
r/cób|t|«|_||j|«|||_yyr.)r*rSr=s r-rzLogLocator.set_params@ s7à Рܘt›ˆDŒJØ Ð Ø N‰N˜4Ô Ø Ð Ø$ˆD r/cór|d|_yt|t«rtjd|¬«||_y t j |t¬«|_|jjdk7r#td |jjd
«y#t$r}td|d«|d}~wwxYw) zT
Set the minor ticks for the log scaling every ``base**i*subs[j]``.
Nr)r­r))Údtypez>subs must be None, 'all', 'auto' or a sequence of floats, not rxr'z5A sequence passed to subs must be 1-dimensional, not z
-dimensional.)
Ú_subsrýrr(r*Úndim)r+rs r-zLogLocator._set_subsI 𠈈D
˜œcÔ
× Ñ ˜°TÕ ˆD
ŸZ™Z¨´: