HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyc
�
�)�Uc@ s�dZddlmZddlZddlZddlZddlmZddlm	Z	ddlm
ZddEd��YZd	efd
��YZ
de
fd��YZd
e
fd��YZde
fd��YZde
fd��YZde
fd��YZde
fd��YZde
fd��YZde
fd��YZdefd��YZdefd��YZde
fd ��YZd!efd"��YZd#efd$��YZd%efd&��YZd'efd(��YZd)efd*��YZd+�Zd,dFd-��YZd.efd/��YZ d0d1d2�Z!d3efd4��YZ"d5d6�Z#d5d7�Z$d8�Z%d5d9�Z&d:�Z'd;efd<��YZ(d=efd>��YZ)d?e"fd@��YZ*dAefdB��YZ+dCefdD��YZ,dGZ-dS(Hs
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..


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.  You initialize this with a base, eg
10, and it picks axis limits and ticks that are multiples of your
base.

The Locator subclasses defined here are

:class:`NullLocator`
    No ticks

:class:`FixedLocator`
    Tick locations are fixed

:class:`IndexLocator`
    locator for index plots (eg. where x = range(len(y)))

:class:`LinearLocator`
    evenly spaced ticks from min to max

:class:`LogLocator`
    logarithmically ticks from min to max

:class:`MultipleLocator`
    ticks and range are a multiple of base;
                  either integer or float
:class:`OldAutoLocator`
    choose a MultipleLocator and dyamically reassign it for
    intelligent ticking during navigation

:class:`MaxNLocator`
    finds up to a max number of ticks at nice  locations

:class:`AutoLocator`
    :class:`MaxNLocator` with simple defaults. This is the default
    tick locator for most plotting.

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( xmajorLocator )
  ax.xaxis.set_minor_locator( xminorLocator )
  ax.yaxis.set_major_locator( ymajorLocator )
  ax.yaxis.set_minor_locator( yminorLocator )

The default minor locator is the NullLocator, eg 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:`FormatStrFormatter`
    use a sprintf format string

:class:`ScalarFormatter`
    default formatter for scalars; autopick the fmt string

:class:`LogFormatter`
    formatter for log axes


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( xmajorFormatter )
  ax.xaxis.set_minor_formatter( xminorFormatter )
  ax.yaxis.set_major_formatter( ymajorFormatter )
  ax.yaxis.set_minor_formatter( yminorFormatter )

See :ref:`pylab_examples-major_minor_demo1` for an example of setting
major an minor ticks.  See the :mod:`matplotlib.dates` module for
more information and examples of using date locators and formatters.
i����(tdivisionN(trcParams(tcbook(t
transformst
TickHelpercB sNeZdZddd��YZd�Zd�Zd�Zd�Zd�Z	RS(	t	DummyAxiscB s5eZd�Zd�Zd�Zd�Zd�ZRS(cC s(tjj�|_tjj�|_dS(N(tmtransformstBboxtunittdataLimtviewLim(tself((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt__init__�scC s
|jjS(N(R
t	intervalx(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytget_view_interval�scC s||f|j_dS(N(R
R
(Rtvmintvmax((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytset_view_interval�scC s
|jjS(N(R	R
(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytget_data_interval�scC s||f|j_dS(N(R	R
(RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytset_data_interval�s(t__name__t
__module__RRRRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s
				cC s
||_dS(N(taxis(RR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytset_axis�scC s%|jdkr!|j�|_ndS(N(RtNoneR(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytcreate_dummy_axis�scC s|jj||�dS(N(RR(RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�scC s|jj||�dS(N(RR(RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�scC s$|j||�|j||�dS(N(RR(RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt
set_bounds�sN((
RRRRRRRRRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s				t	FormattercB sMeZdZgZdd�Zd�Zd�Zd�Zd�Z	d�Z
RS(s/
    Convert the tick location to a string
    cC std��dS(sPReturn the format for tick val x at position pos; pos=None indicated unspecifiedsDerived must overideN(tNotImplementedError(Rtxtpos((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt__call__�scC s
|j|�S(N(R(Rtvalue((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytformat_data�scC s
|j|�S(sreturn a short string version(R!(RR ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytformat_data_short�scC sdS(Nt((R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt
get_offset�scC s
||_dS(N(tlocs(RR%((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytset_locs�scC s|S(s�
        some classes may want to replace a hyphen for minus with the
        proper unicode symbol as described `here
        <http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720>`_.
        The default is to do nothing

        Note, if you use this method, eg 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
        interative 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
        ((Rts((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt	fix_minus�sN(RRt__doc__R%RRR!R"R$R&R((((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s				tIndexFormattercB s#eZdZd�Zdd�ZRS(sL
    format the position x to the nearest i-th label where i=int(x+0.5)
    cC s||_t|�|_dS(N(tlabelstlentn(RR+((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s	cC sBt|d�}|dkr dS||jkr3dS|j|SdS(sPReturn the format for tick val x at position pos; pos=None indicated unspecifiedg�?iR#N(tintR-R+(RRRti((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�sN(RRR)RRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR*�s	t
NullFormattercB seZdZdd�ZRS(sAlways return the empty stringcC sdS(s4Return the format for tick val *x* at position *pos*R#((RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�sN(RRR)RR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR0�stFixedFormattercB s5eZdZd�Zdd�Zd�Zd�ZRS(s$Return fixed strings for tick labelscC s||_d|_dS(s�
        *seq* is a sequence of strings.  For positions ``i < len(seq)`` return
        *seq[i]* regardless of *x*.  Otherwise return ''
        R#N(tseqt
offset_string(RR2((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s	cC s4|dks!|t|j�kr%dS|j|SdS(s4Return the format for tick val *x* at position *pos*R#N(RR,R2(RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s!cC s|jS(N(R3(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR$�scC s
||_dS(N(R3(Rtofs((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytset_offset_string�sN(RRR)RRRR$R5(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR1�s
		t
FuncFormattercB s#eZdZd�Zdd�ZRS(s.
    User defined function for formatting
    cC s
||_dS(N(tfunc(RR7((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRscC s|j||�S(s4Return the format for tick val *x* at position *pos*(R7(RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRsN(RRR)RRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR6s	tFormatStrFormattercB s#eZdZd�Zdd�ZRS(s0
    Use a format string to format the tick
    cC s
||_dS(N(tfmt(RR9((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRscC s|j|S(s4Return the format for tick val *x* at position *pos*(R9(RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRsN(RRR)RRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR8
s	tOldScalarFormattercB s#eZdZdd�Zd�ZRS(s.
    Tick location is a plain old number.
    cC s5|jj�\}}t||�}|j||�S(s4Return the format for tick val *x* at position *pos*(RRtabst
pprint_val(RRRtxmintxmaxtd((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRsc	C sEt|�dkr,|t|�kr,d|S|dkrAd}nZ|dkrVd}nE|dkrkd}n0|d	kr�d
}n|dkr�d}nd}||}|jd
�}t|�dkr)|djd�jd�}|ddjdd�}|ddjd�}d|||f}n|jd�jd�}|S(Ng��@s%dg{�G�z�?s%1.3eg�������?s%1.3fgj�@s%1.1ei
s%1.1fis%1.2fteiit0t.t+R#s%se%s%s(R;R.tsplitR,trstriptreplacetlstrip(	RRR?R9R'ttuptmantissatsigntexponent((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR<$s,$					
N(RRR)RRR<(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR:stScalarFormattercB s�eZdZeed�Zd�Zd�Zedede�Z	d�Z
dd�Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�ZRS(s�
    Tick location is 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.

    cC sO|j|�td|_||_d|_d|_t|_td|_dS(Nstext.usetexiR#saxes.formatter.limits(	t
set_useOffsetRt_usetext_useMathTexttorderOfMagnitudetformattTruet_scientifict_powerlimits(Rt	useOffsettuseMathText((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRGs

				cC s|jS(N(t
_useOffset(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt
get_useOffsetSscC s=|ttgkr'd|_||_nt|_||_dS(Ni(RRtFalsetoffsetRW(Rtval((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRMVs
		tfgettfsetcC s-tdstdr|S|jdd�SdS(s&use a unicode minus rather than hyphenstext.usetexsaxes.unicode_minust-u−N(RRF(RR'((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR(`scC s9t|j�dkrdS|j|�}|j|�SdS(s4Return the format for tick val *x* at position *pos*iR#N(R,R%R<R((RRRR'((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRescC st|�|_dS(seTrue or False to turn scientific notation on or off
        see also :meth:`set_powerlimits`
        N(tboolRS(Rtb((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytset_scientificmscC s+t|�dkstd��||_dS(s
        Sets size thresholds for scientific notation.

        e.g. ``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 :meth:`set_scientific`.
        is'argument must be a sequence of length 2N(R,tAssertionErrorRT(Rtlims((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytset_powerlimitsss	cC sd|S(s:return a short formatted string representation of a numbers%-12g((RR ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR"scC s |jd|�}|j|�S(s4return a formatted string representation of a numbers%1.10e(t_formatSciNotationR((RR R'((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR!�scC sct|j�dkrdSd}|js1|jrVd}d}|jrw|j|j�}|jdkrwd|}qwn|jr�|js�|jr�|jd|j�}q�d|j}n|jr�|dkr�d|}ndjd|d|d	f�}qV|jr>|dkr d
|}ndjd||df�}qVdj||f�}n|j|�S(s'Return scientific notation, plus offsetiR#RCi
s1e%ds\times\mathdefault{%s}t$s
\mathdefault{s}$s\times%s(	R,R%RPRZR!RNROtjoinR((RR't	offsetStrt	sciNotStr((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR$�s0			
!	
cC sz||_t|j�dkrv|jj�\}}t||�}|jr\|j|�n|j|�|j�ndS(sset the locations of the ticksiN(	R%R,RRR;RWt_set_offsett_set_orderOfMagnitudet_set_format(RR%RRR?((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR&�s		
cC s#|j}|dks.t|�s.|dkr;d|_dStj|�}|rtjtjtjtj	|����}tjtj|��}tj	||�dkr|dkr�tj
tj|�d|�d||_qtjtj|�d|�d||_qd|_ndS(Niii
(
R%RR,RZtnptmeantmathtfloortlog10tabsolutetceiltmaxtmin(RtrangeR%tave_loctave_oomt	range_oom((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRj�s	%	*..cC s�|jsd|_dStj|j�}|jrLtjtj|��}nX|d|dkrm|d}n
|d}|dkr�d}ntjtj|��}||j	dkr�||_n(||j	dkr�||_n	d|_dS(Nii����i(
RSRPRmRrR%RZRoRpRqRT(RRvR%toomR[((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRk�s"			

	cC s�tj|j�|jd|jd}g|D]2}ttd|�jd�djd��^q/}|j	�dt|d�d	|_
|jr�d
|j
|_
n|jr�d|j
|_
ndS(Ni
gV瞯�<s%1.8fRBiRAs%1.i����tfs$%s$s$\mathdefault{%s}$(
RmtasarrayR%RZRPR,tstrRDREtsortRQRNRO(RR%tloctsigfigs((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRl�s(<
		cC sA||jd|j}tj|�dkr6d}n|j|S(Ni
g:�0�yE>i(RZRPRmRrRQ(RRtxp((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR<�s	cC s|jd�}y�|djd�jd�}|ddjdd�}|ddjd�}|jsq|jr�|dkr�d}n|r�d	||f}n|r�|r�d
||fSd||fSn d|||fjd�}|SWntk
r}|SXdS(
NR@iRARBiRCR#t1s	10^{%s%s}s%s{\times}%ss%s%ss%se%s%s(RDRERFRGRORNt
IndexError(RR'RHtsignificandRJRKtmsg((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRe�s"	N(RRR)RRRYRRXRMtpropertyRUR(RRRaRdR"R!R$R&RjRkRlR<Re(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRL<s$														tLogFormattercB sVeZdZded�Zd�Zd�Zd	d�Zd�Z	d�Z
d�ZRS(
sp
    Format values for log axis;

    if attribute *decadeOnly* is True, only the decades will be labelled.
    g$@cC s#|d|_||_t|_dS(s�
        *base* is used to locate the decade tick,
        which will be the only one to be labeled if *labelOnlyBase*
        is ``False``
        gN(t_baset
labelOnlyBaseRRt
decadeOnly(RtbaseR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRs
	cC s
||_dS(scchange the *base* for labeling - warning: should always match the base used for :class:`LogLocator`N(R�(RR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�scC s
||_dS(s"switch on/off minor ticks labelingN(R�(RR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytlabel_minorscC s�|jj�\}}t||�}|j}|dkr>dStj|�}tjt|��tj|�}t|�}	|	r�|j	r�d}
nD|dkr�d|}
n+|dkr�d|}
n|j
||�}
|dkr�d|
}
n|j|
�S(	s4Return the format for tick val *x* at position *pos*gRAR#i's%1.0eii����s-%s(RRR;R�RmRJRotlogt	is_decadeR�R<R((RRRRRR?R`RJtfxtisDecadeR'((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRs$	"	


cC s7|j}t|_tj|j|��}||_|S(N(R�RYRt
strip_mathR(RR R`((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR!/s
			cC sd|S(s:return a short formatted string representation of a numbers%-12g((RR ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR"6sc	C sEt|�dkr,|t|�kr,d|S|dkrAd}nZ|dkrVd}nE|dkrkd}n0|d	kr�d
}n|dkr�d}nd}||}|jd
�}t|�dkr)|djd�jd�}|ddjdd�}|ddjd�}d|||f}n|jd�jd�}|S(Ng��@s%dg{�G�z�?s%1.3eg�������?s%1.3fgj�@s%1.1ei
s%1.1fis%1.2fR@iiRARBRCR#s%se%s%s(R;R.RDR,RERFRG(	RRR?R9R'RHRIRJRK((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR<:s,$					
N(RRR)RRRR�R�RRR!R"R<(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s
				tLogFormatterExponentcB seZdZdd�ZRS(sJ
    Format values for log axis; using ``exponent = log_base(value)``
    cC s|jj�\}}tj||dd�\}}t||�}|j}|dkr\dStj|�}tj	t|��tj	|�}t
|�}	|	r�|jr�d}
nD|dkr�d|}
n+|dkr�d|}
n|j||�}
|d	krd
|
}
n|j
|
�S(s4Return the format for tick val *x* at position *pos*texpanderg�������?iRAR#i's%1.0eii����s-%s(RRRtnonsingularR;R�RmRJRoR�tis_close_to_intR�R<R((RRRRRR?R`RJR�R�R'((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRVs&	"	


N(RRR)RR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�QstLogFormatterMathtextcB seZdZdd�ZRS(sJ
    Format values for log axis; using ``exponent = log_base(value)``
    c
C s|j}td}|dkr0|r)dSdSntj|�}tjt|��tj|�}t|�}|dkr�d}nd}|r�|jr�d}	ns|s�|r�d|||f}	qd	|||f}	n;|r�d
||t	|�f}	nd||t	|�f}	|	S(s4Return the format for tick val *x* at position *pos*stext.usetexis$0$s$\mathdefault{0}$i����R^R#s
$%s%d^{%.2f}$s$\mathdefault{%s%d^{%.2f}}$s$%s%d^{%d}$s$\mathdefault{%s%d^{%d}}$(
R�RRmRJRoR�R;R�R�tnearest_long(
RRRR`tusetexRJR�R�tsign_stringR'((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRvs.	
"			N(RRR)RR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�qstEngFormattercB s�eZdZidd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6Zdd&d#�Zd&d$�Zd%�ZRS('s�
    Formats axis values using engineering prefixes to represent powers of 1000,
    plus a specified unit, eg. 10 MHz instead of 1e7.
    tyi��tzi��tai��R{i�tpi�R-i����uμi����tmi����R#itkitMitGi	tTitPitEitZitYicC s||_||_dS(N(Rtplaces(RRR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s	cC s)d|j|�|jf}|j|�S(Ns%s%s(t
format_engRR((RRRR'((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�sc	C sKtjt|��}d}|dkr7d}|}n|dkrrtjttj|j�d�d��}ntjd�}|jt|j	j
���}|jt|j	j
���}|j	t|�}||d|}|jd	kr�d}n7|jdkrd}n|jdkr1d|j}n|||f}|j
�S(
sY 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
        u'-1.00 \u03bc'

        @param num: the value to represent
        @type num: either a numeric value or a string that can be converted to
                   a numeric value (as per decimal.Decimal constructor)

        @return: engineering formatted string
        iii����ii
u%g %su%i %su
%%.%if %%sN(tdecimaltDecimalR}R.RoRpRqRuRttENG_PREFIXEStkeysR�Rtstrip(	RtnumtdnumRJtpow10tprefixtmantt
format_strt	formatted((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s(
/		N(RRR)R�RRRR�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s,
tLocatorcB sSeZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	s�
    Determine the tick locations;

    Note, you should not use the same locator between different :class:`~matplotlib.axis.Axis`
    because the locator stores references to the Axis data and view
    limits
    i�cC std��dS(s!Return the locations of the tickssDerived must overrideN(R(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�scC sCt|�|jkr?tdt|�|d|df��n|S(sJraise a RuntimeError if Locator attempts to create more than MAXTICKS locssOLocator attempting to generate %d ticks from %s to %s: exceeds Locator.MAXTICKSii����(R,tMAXTICKStRuntimeError(RR%((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytraise_if_exceedss*cC stj||�S(sk
        select a scale for the range from vmin to vmax

        Normally This will be overridden.
        (RR�(RRR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytview_limits
scC s|j|jj��S(sautoscale the view limits(R�RR(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt	autoscalescC s�|�}t|�}|jj�\}}tj||dd�\}}|dkrs|t|d|d�}nt||�}||d}||7}||7}|jj||dt�dS(	s*Pan numticks (can be positive or negative)R�g�������?iiig@tignoreN(R,RRRR�R;RRR(RtnumstepsttickstnumticksRRtstepR?((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytpans	

cC sv|jj�\}}tj||dd�\}}t||�}d||}|jj||||dt�dS(s>Zoom in/out on axis; if direction is >0 zoom in, else zoom outR�g�������?g�������?R�N(RRRR�R;RRR(Rt	directionRRtintervalR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytzoom(s
cC sdS(s1refresh internal information based on current limN((R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytrefresh1s(RRR)R�RR�R�R�R�R�R�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s							tIndexLocatorcB s eZdZd�Zd�ZRS(s�
    Place a tick on every multiple of some base number of points
    plotted, eg on every 5th point.  It is assumed that you are doing
    index plotting; ie the axis is 0, len(data).  This is mainly
    useful for x ticks.
    cC s||_||_dS(s<place ticks on the i-th data points where (i-offset)%base==0N(R�RZ(RR�RZ((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR=s	cC s?|jj�\}}|jtj||j|d|j��S(s!Return the locations of the ticksi(RRR�RmtarangeRZR�(Rtdmintdmax((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRBs(RRR)RR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�6s	tFixedLocatorcB s#eZdZdd�Zd�ZRS(sn
    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.
    cC sFtj|�|_||_|jdk	rBt|jd�|_ndS(Ni(RmR|R%tnbinsRRt(RR%R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRTs	cC s�|jdkr|jSttdt|j�t|j��d�}|jdd|�}x`td|�D]O}|j|d|�}tj	|�j
�tj	|�j
�krk|}qkqkW|j|�S(s!Return the locations of the ticksg�G�z��?iN(R�RR%RtR.R,tfloatRvRmRrRuR�(RR�R�R/tticks1((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRZs/*
N(RRR)RRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�Is	tNullLocatorcB seZdZd�ZRS(s
    No ticks
    cC sgS(s!Return the locations of the ticks((R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRns(RRR)R(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�ist
LinearLocatorcB s8eZdZddd�Zd�Zd�Zd�ZRS(s
    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
    cC s.||_|dkr!i|_n	||_dS(sX
        Use presets to set locs based on lom.  A dict mapping vmin, vmax->locs
        N(R�Rtpresets(RR�R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR}s	cC s�|jj�\}}tj||dd�\}}||krO||}}n||f|jkru|j||fS|jdkr�|j�n|jdkr�gStj	|||j�}|j
|�S(s!Return the locations of the ticksR�g�������?iN(RRRR�R�R�Rt
_set_numticksRmtlinspaceR�(RRRtticklocs((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s
cC s
d|_dS(Ni(R�(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��scC s�||kr||}}n||kr?|d8}|d7}nttj||�d�\}}|dkrz|d8}nd|}tj||�|}tj||�|}tj||�S(s+Try to choose the view limits intelligentlyig�?i
(tdivmodRoRqRpRsRR�(RRRRKt	remaindertscale((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s

"
N(RRR)RRRR�R�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�rs

		cC s"t||�dkrtStSdS(Ng�����|�=(R;RRRY(RR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytcloseto�stBasecB sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sEthis solution has some hacks to deal with floating point inaccuraciescC s|dkst�||_dS(Ni(RbR�(RR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�scC sXt||j�\}}t|d�rMt||jd�rM|d|jS||jS(s'return the largest multiple of base < xii(R�R�R�(RRR?R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytlt�s&cC sHt||j�\}}t||jd�r=|d|jS||jS(s(return the largest multiple of base <= xi(R�R�R�(RRR?R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytle�scC sLt||j�\}}t||jd�r=|d|jS|d|jS(s(return the smallest multiple of base > xii(R�R�R�(RRR?R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytgt�scC sXt||j�\}}t|d�rIt||jd�rI||jS|d|jS(s)return the smallest multiple of base >= xii(R�R�R�(RRR?R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytge�s&cC s|jS(N(R�(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytget_base�s(	RRR)RR�R�R�R�R�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s					tMultipleLocatorcB s,eZdZdd�Zd�Zd�ZRS(sW
    Set a tick on every integer that is multiple of base in the
    view interval
    g�?cC st|�|_dS(N(R�R�(RR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�scC s�|jj�\}}||kr1||}}n|jj|�}|jj�}||d||}|tj|d�|}|j|�S(s!Return the locations of the ticksg����MbP?i(RRR�R�R�RmR�R�(RRRR�R-R%((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�scC sW|jj|�}|jj|�}||krG|d8}|d7}ntj||�S(sd
        Set the view limits to the nearest multiples of base that
        contain the data
        i(R�R�R�RR�(RR�R�RR((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s

(RRR)RRR�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s	iidc
C s	t||�}tt|�t|��}|dksG||dkrKdSd||}t|�||krxd}n]|dkr�ttj|�d�d}d|}n(ttj|�d�d}d|}ttj||�d�d}d|}	|	|fS(	Nig�-���q=g�?gg�?ii
(g�?g(R;RtR�RoRq(
RRR-t	thresholdtdvtmaxabsvtmeanvRZtexR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytscale_ranges	
 
tMaxNLocatorc
B sheZdZedddd
dedededd
�Zd�Zd	�Z	d
�Z
d�Zd�ZRS(s<
    Select no more than N intervals at nice locations.
    R�i
tstepsttrimtintegert	symmetrictprunecO sY|r8|d|d<t|�dkr8td��q8n|j|j�|j|�dS(s�
        Keyword args:

        *nbins*
            Maximum number of intervals; one less than max number of ticks.

        *steps*
            Sequence of nice numbers starting with 1 and ending with 10;
            e.g., [1, 2, 4, 5, 10]

        *integer*
            If True, ticks will take only integer values.

        *symmetric*
            If True, autoscaling will result in a range symmetric
            about zero.

        *prune*
            ['lower' | 'upper' | 'both' | 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.
            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.

        iR�is6Keywords are required for all arguments except 'nbins'N(R,t
ValueErrort
set_paramstdefault_params(Rtargstkwargs((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRs cK s�d|kr"t|d�|_nd|kr>|d|_nd|krZ|d|_nd|krv|d|_nd|kr�|d}|dk	r�|dkr�td	��n||_nd
|krI|d
}|dkrddd
dddddddg
|_qIt|d�dkr=t	|�}|j
d�n||_nd|kre|d|_n|jr�g|jD]%}t|d�ddkrx|^qx|_ndS(NR�R�R�R�R�tuppertlowertboths/prune must be 'upper', 'lower', 'both', or NoneR�ig�?ig@iiiiii
i����g����MbP?(supperslowerR�(R.t_nbinst_trimt_integert
_symmetricRR�t_prunet_stepstlisttappendR�(RR�R�R�R-((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�Gs4

*	cC s)|j}t|||�\}}|jr<td|�}n||8}||8}|||}||}|}|}	xb|jD]W}
|
|kr�q~n|
|9}
|
t||
�d}	|	|
|}||kr~Pq~q~W|jrtt|||
�d�}||8}ntj	|d�|
|	|S(Nii(
R�R�R�RtR�R�R�R.RmR�(RRRR�R�RZtraw_steptscaled_raw_stept	best_vmaxt	best_vminR�t
extra_bins((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytbin_boundariesds,		



	
cC s�|jj�\}}tj||dd�\}}|j||�}|j}|dkrg|d}n5|dkr�|d }n|dkr�|dd!}n|j|�S(NR�g�������?R�iR�i����R�(RRRR�RR�R�(RRRR%R�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR~s	

cC st|jr4tt|�t|��}|}|}ntj||dd�\}}tj|j||�ddg�S(NR�g�������?ii����(R�RtR;RR�RmttakeR(RR�R�tmaxabs((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s		N(
RRR)tdictRRRRYR�RR�RRR�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s		(			i
cC s>|dkr|Stjtj|�tj|��}||S(s#floor x to the nearest lower decadeg(RoRpR�(RR�tlx((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pytdecade_down�s%cC s=|dkr|Stjtj|�tj|��}||S(s#ceil x to the nearest higher decadeg(RoRsR�(RR�R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt	decade_up�s%cC s<|dkrdS|dkr*t|d�St|d�SdS(Nilg�?(tlong(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s
cC sOtj|�stS|dkr#tStjt|��tj|�}t|�S(Ng(RmtisfiniteRYRRRoR�R;R�(RR�R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��s"cC s-tj|�stSt|t|��dkS(Ng�����|�=(RmRRYR;R�(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��st
LogLocatorcB sPeZdZddgdd�Zd�Zd�Zd�Zd�Zd	�ZRS(
s3
    Determine the tick locations for log axes
    g$@g�?icC s0|j|�|j|�d|_||_dS(s>
        place ticks on the location= base**i*subs[j]
        iN(R�tsubsR�tnumdecs(RR�R
R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s

	cC s|d|_dS(sW
        set the base of the log scaling (major tick every base**i, i integer)
        gN(R�(RR�((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��scC s2|dkrd|_ntj|�d|_dS(sK
        set the minor ticks the log scaling every base**i*subs[j]
        gN(Rt_subsRmR|(RR
((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR
�scC s
d|_dS(Ni(R�(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��sc
C s�|j}|jj�\}}t|jd�r�|jjjdkr�tjtj|�tj|��}t	j
||j|�}||}|S|dkr�|jj�}|dks�t	j
|�r�td��q�ntj|�tj|�}tj|�tj|�}||kr.||}}ntj|�tj|�}|jdkr�|dkrzt	jdg�}q�|dkr�t	j
d|d�}q�t	j
d|�}n	|j}d	}x%||d	|jkr�|d	7}q�Wt	j
tj|�tj|�||�}t|�d	ksIt|d	k�rx|d
dkrxg}x0||D]}	|j||	�qZWn
||}|jt	j|��S(s!Return the locations of the tickstaxestpolargsAData has no positive values, and therefore can not be log-scaled.i
g�?ig@iiN(R�RRthasattrR
tnameRoRsR�RmR�Rt
get_minposRR�RpRRtarrayR�R,textendR�(
RR`RRtdecadesR�tnumdecR
tstridetdecadeStart((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�sF	'%
	4
cC s`|j}||kr%||}}n|jjjdkrztjtj|�tj|��}|||j}||fS|jj�}|dks�t	j
|�r�td��n||kr�|}nt||j�s�t
||j�}nt||j�st||j�}n||krJt
||j�}t||j�}ntj||�}|S(s+Try to choose the view limits intelligentlyRisAData has no positive values, and therefore can not be log-scaled.(R�RR
RRoRsR�RRRmRR�R�RRRR�(RRRR`tminpostresult((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s,	%
	(	RRR)RR�R
R�RR�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR	�s						2tSymmetricalLogLocatorcB s8eZdZdgd�Zd�Zd�Zd�ZRS(s3
    Determine the tick locations for log axes
    g�?cC s||_||_d|_dS(s>
        place ticks on the location= base**i*subs[j]
        iN(t
_transformRR�(Rt	transformR
((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR*s		cC s
d|_dS(Ni(R�(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�2sc
C s�|jj}|jj�\}}|jj||f�\}}||kr[||}}ntj|�tj|�}|jdkr�|dkr�t
jdg�}q�|dkr�t
jd|d�}q�t
jd|�}nt
j
|j�}d}x%||d|jkr|d7}q�Wt
jtj|�tj|�||�}t|�dksm|ddkr�g}x\|D]1}	|j|t
j|	�|t
j|	��qzWn t
j|�|t
j|�}|jt
j|��S(s!Return the locations of the ticksi
g�?ig@iiN(RR�RRRRoRpRsRRRmRR�R|R�R,RRJR;R�(
RR`RRRR
RRR�tdecade((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR5s.+"
2 cC s*|jj}||kr(||}}ntt|�|�so|dkr]t||�}qot||�}ntt|�|�s�|dkr�t||�}q�t||�}n||kr|dkr�t||�}t||�}qt||�}t||�}ntj||�}|S(s+Try to choose the view limits intelligentlyi(RR�R�R;RRRR�(RRRR`R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�Ts&(RRR)RR�RR�(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR%s
		tAutoLocatorcB seZd�ZRS(c	C s)tj|dddddddg�dS(NR�i	R�iiii
(R�R(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRps(RRR(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRostAutoMinorLocatorcB seZdZd�ZRS(s�
    Dynamically find minor tick positions based on the positions of
    major ticks. Assumes the scale is linear and major ticks are
    evenly spaced.
    cC so|jj�}y|d|d}Wntk
rDtd��nXtd|jd�d�}|ddkr|d}n
|d	}|d|}|d
|}tj|||�}|jj�\}}	||	kr�|	|}}	n|||k||	k@}dt	|d|d�}
g|D]+}tj	||�|
kj
�r(|^q(}|jtj|��S(s!Return the locations of the ticksiis:Need at least two major ticks to find minor tick locationss%eR@ig�����|�=g@g@i����g�?(
Rtget_majorticklocsR�R�R�RDRmR�RR;tallR�R(Rt	majorlocst	majorstepttempt	minorstepttminttmaxR%RRtdifftl((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRys&


8(RRR)R(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyRsstOldAutoLocatorcB s;eZdZd�Zd�Zd�Zd�Zd�ZRS(so
    On autoscale this class picks the best MultipleLocator to set the
    view limits and the tick locs.

    cC st�|_dS(N(R�t_locator(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�scC s|j�|j|j��S(s!Return the locations of the ticks(R�R�R+(R((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR�s
cC sY|jj�\}}tj||dd�\}}t||�}|j|�|_dS(s1refresh internal information based on current limR�g�������?N(RRRR�R;tget_locatorR+(RRRR?((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��scC s5t||�}|j|�|_|jj||�S(s+Try to choose the view limits intelligently(R;R,R+R�(RRRR?((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR��scC s�t|�}|dkr'td�}n�ytj|�}Wntk
rYtd��nXtj|�}d|}|d|kr�|}n'|d|kr�|d}n
|d}t|�}|S(	s)pick the best locator based on a distanceig�������?s'AutoLocator illegal data interval rangei
iig@g@(R;R�RoRqt
OverflowErrorR�Rp(RR?tlocatortldtfldR�tticksize((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR,�s 

	

(RRR)RRR�R�R,(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyR*�s				(((RRR1R0R6R8RLR�R�R�R�R�R�R�R�R	RR�R�(.R)t
__future__RR�RotnumpyRmt
matplotlibRRRRRRR*R0R1R6R8R:RLR�R�R�R�R�R�R�R�R�R�R�R�R�R�RRR�R�R�R	RRRR*t__all__(((sD/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/ticker.pyt<module>us^&*$�O (VG 	C	'!�		pJ%8