ó
±éRc           @  s_  d  Z  d d l m Z m Z d d l Z d d l Z d d l Z d d l Z d d l	 m
 Z
 d d l	 m Z d d l	 m Z d e f d „  ƒ  YZ d	 e f d
 „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d  „  ƒ  YZ d! e f d" „  ƒ  YZ d# e f d$ „  ƒ  YZ d% e f d& „  ƒ  YZ d' e f d( „  ƒ  YZ d) e f d* „  ƒ  YZ  d+ e f d, „  ƒ  YZ! d- „  Z" d. f  d/ „  ƒ  YZ# d0 e f d1 „  ƒ  YZ$ d2 d3 d4 „ Z% d5 e f d6 „  ƒ  YZ& d7 d8 „ Z' d7 d9 „ Z( d: „  Z) d7 d; „ Z* d< „  Z+ d= e f d> „  ƒ  YZ, d? e f d@ „  ƒ  YZ- dA e& f dB „  ƒ  YZ. dC e f dD „  ƒ  YZ/ dE e f dF „  ƒ  YZ0 d	 d d d d d d d d d d# d% d' d) d+ d= dA d0 d5 dC f Z1 d S(G   s!  
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 (e.g., 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.

:class:`AutoMinorLocator`
    locator for minor ticks when the axis is linear and the
    major ticks are uniformly spaced.  It 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( 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ÿÿÿÿ(   t   divisiont   print_functionN(   t   rcParams(   t   cbook(   t
   transformst
   _DummyAxisc           B  sA   e  Z d  d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   i    c         C  s1   t  j j ƒ  |  _ t  j j ƒ  |  _ | |  _ d  S(   N(   t   mtransformst   Bboxt   unitt   dataLimt   viewLimt   _minpos(   t   selft   minpos(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   __init__ˆ   s    c         C  s
   |  j  j S(   N(   R
   t	   intervalx(   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   get_view_interval�   s    c         C  s   | | f |  j  _ d  S(   N(   R
   R   (   R   t   vmint   vmax(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   set_view_interval�   s    c         C  s   |  j  S(   N(   R   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt
   get_minpos“   s    c         C  s
   |  j  j S(   N(   R	   R   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   get_data_interval–   s    c         C  s   | | f |  j  _ d  S(   N(   R	   R   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   set_data_interval™   s    (   t   __name__t
   __module__R   R   R   R   R   R   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ‡   s   				t
   TickHelperc           B  s;   e  Z d Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C  s   | |  _  d  S(   N(   t   axis(   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   set_axis    s    c         K  s%   |  j  d  k r! t | �  |  _  n  d  S(   N(   R   t   NoneR   (   R   t   kwargs(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   create_dummy_axis£   s    c         C  s   |  j  j | | ƒ d  S(   N(   R   R   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   §   s    c         C  s   |  j  j | | ƒ d  S(   N(   R   R   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ª   s    c         C  s$   |  j  | | ƒ |  j | | ƒ d  S(   N(   R   R   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt
   set_bounds­   s    N(	   R   R   R   R   R   R   R   R   R   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   �   s   				t	   Formatterc           B  sM   e  Z d  Z g  Z d d „ Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 RS(   s/   
    Convert the tick location to a string
    c         C  s   t  d ƒ ‚ d S(   s[   Return the format for tick val x at position pos; pos=None
           indicated unspecifieds   Derived must overrideN(   t   NotImplementedError(   R   t   xt   pos(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   __call__º   s    c         C  s   |  j  | ƒ S(   N(   R$   (   R   t   value(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   format_data¿   s    c         C  s   |  j  | ƒ S(   s   return a short string version(   R&   (   R   R%   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   format_data_shortÂ   s    c         C  s   d S(   Nt    (    (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt
   get_offsetÆ   s    c         C  s   | |  _  d  S(   N(   t   locs(   R   R*   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   set_locsÉ   s    c         C  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, 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   t   s(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt	   fix_minusÌ   s    N(   R   R   t   __doc__R*   R   R$   R&   R'   R)   R+   R-   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR    ²   s   				t   IndexFormatterc           B  s#   e  Z d  Z d „  Z d d „ Z RS(   sL   
    format the position x to the nearest i-th label where i=int(x+0.5)
    c         C  s   | |  _  t | ƒ |  _ d  S(   N(   t   labelst   lent   n(   R   R0   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ã   s    	c         C  sB   t  | d ƒ } | d k  r  d S| |  j k r3 d S|  j | Sd S(   sX   Return the format for tick val x at position pos; pos=None
        indicated unspecifiedg      à?i    R(   N(   t   intR2   R0   (   R   R"   R#   t   i(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   ç   s    N(   R   R   R.   R   R   R$   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR/   ß   s   	t   NullFormatterc           B  s   e  Z d  Z d d „ Z RS(   s   Always return the empty stringc         C  s   d S(   s4   Return the format for tick val *x* at position *pos*R(   (    (   R   R"   R#   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   ö   s    N(   R   R   R.   R   R$   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR5   ó   s   t   FixedFormatterc           B  s5   e  Z d  Z d „  Z d d „ Z d „  Z d „  Z RS(   s$   Return fixed strings for tick labelsc         C  s   | |  _  d |  _ d S(   s‘   
        *seq* is a sequence of strings.  For positions ``i < len(seq)`` return
        *seq[i]* regardless of *x*.  Otherwise return ''
        R(   N(   t   seqt   offset_string(   R   R7   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ý   s    	c         C  s4   | d k s! | t |  j ƒ k r% d S|  j | Sd S(   s4   Return the format for tick val *x* at position *pos*R(   N(   R   R1   R7   (   R   R"   R#   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$     s    !c         C  s   |  j  S(   N(   R8   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR)     s    c         C  s   | |  _  d  S(   N(   R8   (   R   t   ofs(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   set_offset_string  s    N(   R   R   R.   R   R   R$   R)   R:   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR6   û   s
   		t   FuncFormatterc           B  s#   e  Z d  Z d „  Z d d „ Z RS(   s.   
    User defined function for formatting
    c         C  s   | |  _  d  S(   N(   t   func(   R   R<   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR     s    c         C  s   |  j  | | ƒ S(   s4   Return the format for tick val *x* at position *pos*(   R<   (   R   R"   R#   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$     s    N(   R   R   R.   R   R   R$   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR;     s   	t   FormatStrFormatterc           B  s#   e  Z d  Z d „  Z d d „ Z RS(   s0   
    Use a format string to format the tick
    c         C  s   | |  _  d  S(   N(   t   fmt(   R   R>   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   #  s    c         C  s   |  j  | S(   s4   Return the format for tick val *x* at position *pos*(   R>   (   R   R"   R#   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   &  s    N(   R   R   R.   R   R   R$   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR=     s   	t   OldScalarFormatterc           B  s#   e  Z d  Z d d „ Z d „  Z RS(   s.   
    Tick location is a plain old number.
    c         C  s5   |  j  j ƒ  \ } } t | | ƒ } |  j | | ƒ S(   s4   Return the format for tick val *x* at position *pos*(   R   R   t   abst
   pprint_val(   R   R"   R#   t   xmint   xmaxt   d(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   0  s    c   	      C  sE  t  | ƒ d k  r, | t | ƒ k r, d | S| d k  rA d } nZ | d k  rV d } nE | d k rk d } n0 | d	 k r€ d
 } n | d k r• d } n d } | | } | j d ƒ } t | ƒ d k r)| d j d ƒ j d ƒ } | d d j d d ƒ } | d d j d ƒ } d | | | f } n | j d ƒ j d ƒ } | S(   Ng     ˆÃ@s   %dg{®Gáz„?s   %1.3egš™™™™™¹?s   %1.3fg     jø@s   %1.1ei
   s   %1.1fi   s   %1.2ft   ei   i    t   0t   .t   +R(   s   %se%s%s(   R@   R3   t   splitR1   t   rstript   replacet   lstrip(	   R   R"   RD   R>   R,   t   tupt   mantissat   signt   exponent(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRA   7  s,    $					
N(   R   R   R.   R   R$   RA   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR?   +  s   t   ScalarFormatterc           B  sæ   e  Z d  Z e d d d „ Z d „  Z d „  Z e d e d e ƒ Z	 d „  Z
 d „  Z e d e
 d e ƒ Z d „  Z d d	 „ Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   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.

    c         C  sŠ   |  j  | ƒ t d |  _ | d  k r3 t d } n  | |  _ d |  _ d |  _ t |  _ t d |  _	 | d  k r} t d } n  | |  _
 d  S(   Ns   text.usetexs   axes.formatter.use_mathtexti    R(   s   axes.formatter.limitss   axes.formatter.use_locale(   t   set_useOffsetR   t   _usetexR   t   _useMathTextt   orderOfMagnitudet   formatt   Truet   _scientifict   _powerlimitst
   _useLocale(   R   t	   useOffsett   useMathTextt	   useLocale(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   a  s    				c         C  s   |  j  S(   N(   t
   _useOffset(   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   get_useOffsets  s    c         C  s=   | t  t g k r' d |  _ | |  _ n t |  _ | |  _ d  S(   Ni    (   RW   t   Falset   offsetR^   (   R   t   val(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRR   v  s
    		t   fgett   fsetc         C  s   |  j  S(   N(   RZ   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   get_useLocale€  s    c         C  s)   | d  k r t d |  _ n	 | |  _ d  S(   Ns   axes.formatter.use_locale(   R   R   RZ   (   R   Rb   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   set_useLocaleƒ  s    c         C  s-   t  d s t  d r | S| j d d ƒ Sd S(   s&   use a unicode minus rather than hyphens   text.usetexs   axes.unicode_minust   -u   âˆ’N(   R   RK   (   R   R,   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR-   ‹  s    c         C  s9   t  |  j ƒ d k r d S|  j | ƒ } |  j | ƒ Sd S(   s4   Return the format for tick val *x* at position *pos*i    R(   N(   R1   R*   RA   R-   (   R   R"   R#   R,   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   ’  s    c         C  s   t  | ƒ |  _ d S(   se   True or False to turn scientific notation on or off
        see also :meth:`set_powerlimits`
        N(   t   boolRX   (   R   t   b(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   set_scientificš  s    c         C  s+   t  | ƒ d k s t d ƒ ‚ | |  _ d S(   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`.
        i   s'   argument must be a sequence of length 2N(   R1   t   AssertionErrorRY   (   R   t   lims(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   set_powerlimits   s    	c         C  s(   |  j  r t j d | f ƒ Sd | Sd S(   s:   return a short formatted string representation of a numbers   %-12gN(   RZ   t   localet   format_string(   R   R%   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR'   ¬  s    	c         C  sG   |  j  r! t j d | f ƒ } n
 d | } |  j | ƒ } |  j | ƒ S(   s4   return a formatted string representation of a numbers   %1.10e(   RZ   Rn   Ro   t   _formatSciNotationR-   (   R   R%   R,   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR&   ³  s
    	
c         C  sc  t  |  j ƒ d k r d Sd } |  j s1 |  j rVd } d } |  j rw |  j |  j ƒ } |  j d k rw d | } qw n  |  j r» |  j s’ |  j r« |  j d |  j ƒ } q» d |  j } n  |  j rþ | d k rÝ d | } n  d j d | d | d	 f ƒ } qV|  j r>| d k r d
 | } n  d j d | | d f ƒ } qVd j | | f ƒ } n  |  j | ƒ S(   s'   Return scientific notation, plus offseti    R(   RH   i
   s   1e%ds   \times\mathdefault{%s}t   $s   \mathdefault{s   }$s   \times%s(	   R1   R*   RU   Ra   R&   RS   RT   t   joinR-   (   R   R,   t	   offsetStrt	   sciNotStr(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR)   ¼  s2    				c         C  s€   | |  _  t |  j  ƒ d k r| |  j j ƒ  \ } } t | | ƒ } |  j r\ |  j | ƒ n  |  j | ƒ |  j | | ƒ n  d S(   s   set the locations of the ticksi    N(	   R*   R1   R   R   R@   R^   t   _set_offsett   _set_orderOfMagnitudet   _set_format(   R   R*   R   R   RD   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR+   Û  s    		c         C  s  |  j  } | d  k s. t | ƒ s. | d k r; d |  _ d  St j | ƒ } | rt j t j t j t j	 | ƒ ƒ ƒ ƒ } t j t j | ƒ ƒ } t j	 | | ƒ d k rd | } | d k  rç t j
 t j | ƒ | ƒ | |  _ qt j t j | ƒ | ƒ | |  _ qd |  _ n  d  S(   Ni    i   i
   (   R*   R   R1   Ra   t   npt   meant   matht   floort   log10t   absolutet   ceilt   maxt   min(   R   t   rangeR*   t   ave_loct   ave_oomt	   range_oomt   p10(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRu   æ  s    	%	*
&&c         C  sï   |  j  s d |  _ d  St j |  j ƒ } |  j rL t j t j | ƒ ƒ } nX | d | d k rm | d } n
 | d } | d k rŒ d } n t j t j | ƒ ƒ } | |  j	 d k rÃ | |  _ n( | |  j	 d k râ | |  _ n	 d |  _ d  S(   Ni    iÿÿÿÿi   (
   RX   RU   Rx   R}   R*   Ra   Rz   R{   R|   RY   (   R   R�   R*   t   oomRb   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRv   û  s"    			
	c   	      C  sw  t  |  j ƒ d k  r1 t |  j ƒ | | g } n	 |  j } t j | ƒ |  j d |  j } t j | ƒ } t  |  j ƒ d k  rŒ | d  } n  t t	 j
 t	 j | ƒ ƒ ƒ } t d d | ƒ } d d | } xL | d k rt j | t j | d | ƒƒ j ƒ  | k  r| d	 8} qÎ PqÎ W| d	 7} d
 t | ƒ d |  _ |  j rWd |  j |  _ n |  j rsd |  j |  _ n  d  S(   Ni   g      $@iþÿÿÿi    i   gü©ñÒMbP?i
   t   decimalsi   s   %1.t   fs   $%s$s   $\mathdefault{%s}$(   R1   R*   t   listRx   t   asarrayRa   RU   t   ptpR3   Rz   R{   R|   R   R@   t   roundt   strRV   RS   RT   (	   R   R   R   t   _locsR*   t	   loc_ranget   loc_range_oomt   sigfigst   thresh(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRw     s(    	!.
		c         C  sd   | |  j  d |  j } t j | ƒ d k  r6 d } n  |  j rU t j |  j | f ƒ S|  j | Sd  S(   Ng      $@g:Œ0âŽyE>i    (   Ra   RU   Rx   R}   RZ   Rn   Ro   RV   (   R   R"   t   xp(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRA   2  s    		c         C  sH  |  j  r, t j ƒ  d } t j ƒ  d } n d } d } | j d ƒ } yè | d j d ƒ j | ƒ } | d d j | d	 ƒ } | d d j d ƒ } |  j s© |  j r| d
 k rÊ | d	 k rÊ d	 } n  | rã d | | f } n  | rý | rý d | | f Sd | | f Sn  d | | | f j d ƒ } | SWn t	 k
 rC| SXd  S(   Nt   decimal_pointt   positive_signRG   RH   RE   i    RF   i   R(   t   1s	   10^{%s%s}s   %s{\times}%ss   %s%ss   %se%s%s(
   RZ   Rn   t
   localeconvRI   RJ   RK   RL   RT   RS   t
   IndexError(   R   R,   R”   R•   RM   t   significandRO   RP   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRp   ;  s,    		N(   R   R   R.   RW   R   R   R_   RR   t   propertyR[   Re   Rf   R]   R-   R$   Rj   Rm   R'   R&   R)   R+   Ru   Rv   Rw   RA   Rp   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRQ   V  s*   																		t   LogFormatterc           B  sV   e  Z d  Z d e d „ Z d „  Z d „  Z d	 d „ Z d „  Z	 d „  Z
 d „  Z RS(
   s&   
    Format values for log axis;

    g      $@c         C  s   | d |  _  | |  _ d S(   s”   
        *base* is used to locate the decade tick,
        which will be the only one to be labeled if *labelOnlyBase*
        is ``False``
        g        N(   t   _baset   labelOnlyBase(   R   t   baseR�   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ^  s    c         C  s   | |  _  d S(   sn   change the *base* for labeling - warning: should always match the
           base used for :class:`LogLocator`N(   Rœ   (   R   Rž   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRž   g  s    c         C  s   | |  _  d S(   s"   switch on/off minor ticks labelingN(   R�   (   R   R�   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   label_minorl  s    c         C  sþ   |  j  j ƒ  \ } } t | | ƒ } |  j } | d k r> d St j | ƒ } t j t | ƒ ƒ t j | ƒ } t | ƒ }	 |	 r” |  j	 r” d }
 nD | d k r­ d | }
 n+ | d k  rÆ d | }
 n |  j
 | | ƒ }
 | d k rñ d |
 }
 n  |  j |
 ƒ S(	   s4   Return the format for tick val *x* at position *pos*g        RF   R(   i'  s   %1.0ei   iÿÿÿÿs   -%s(   R   R   R@   Rœ   Rx   RO   Rz   t   logt   is_close_to_intR�   RA   R-   (   R   R"   R#   R   R   RD   Ri   RO   t   fxt   isDecadeR,   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   p  s$    	"	c         C  s7   |  j  } t |  _  t j |  j | ƒ ƒ } | |  _  | S(   N(   R�   R`   R   t
   strip_mathR$   (   R   R%   Ri   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR&   ˆ  s
    			c         C  s   d | S(   s:   return a short formatted string representation of a numbers   %-12g(    (   R   R%   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR'   �  s    c   	      C  sE  t  | ƒ d k  r, | t | ƒ k r, d | S| d k  rA d } nZ | d k  rV d } nE | d k rk d } n0 | d	 k r€ d
 } n | d k r• d } n d } | | } | j d ƒ } t | ƒ d k r)| d j d ƒ j d ƒ } | d d j d d ƒ } | d d j d ƒ } d | | | f } n | j d ƒ j d ƒ } | S(   Ng     ˆÃ@s   %dg{®Gáz„?s   %1.3egš™™™™™¹?s   %1.3fg     jø@s   %1.1ei
   s   %1.1fi   s   %1.2fRE   i   i    RF   RG   RH   R(   s   %se%s%s(   R@   R3   RI   R1   RJ   RK   RL   (	   R   R"   RD   R>   R,   RM   RN   RO   RP   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRA   “  s,    $					
N(   R   R   R.   RW   R   Rž   RŸ   R   R$   R&   R'   RA   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR›   Y  s   					t   LogFormatterExponentc           B  s   e  Z d  Z d d „ Z RS(   sJ   
    Format values for log axis; using ``exponent = log_base(value)``
    c         C  s  |  j  j ƒ  \ } } t j | | d d ƒ\ } } t | | ƒ } |  j } | d k r\ d St j | ƒ } t j	 t | ƒ ƒ t j	 | ƒ } t
 | ƒ }	 |	 r² |  j r² d }
 nD | d k rË d | }
 n+ | d k  rä d | }
 n |  j | | ƒ }
 | d	 k rd
 |
 }
 n  |  j |
 ƒ S(   s4   Return the format for tick val *x* at position *pos*t   expandergš™™™™™©?i    RF   R(   i'  s   %1.0ei   iÿÿÿÿs   -%s(   R   R   R   t   nonsingularR@   Rœ   Rx   RO   Rz   R    R¡   R�   RA   R-   (   R   R"   R#   R   R   RD   Ri   RO   R¢   R£   R,   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   ·  s&    	"	N(   R   R   R.   R   R$   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR¥   ²  s   t   LogFormatterMathtextc           B  s   e  Z d  Z d d „ Z RS(   sJ   
    Format values for log axis; using ``exponent = log_base(value)``
    c   	      C  s  |  j  } t d } | d k r0 | r) d Sd Sn  t j t | ƒ ƒ t j | ƒ } t | ƒ } | d k  rp d n d } | d d k r“ d	 | } n
 d
 | } | r± |  j r± d S| sâ | rÎ d | | | f Sd | | | f Sn4 | rÿ d | | t | ƒ f Sd | | t | ƒ f Sd S(   s4   Return the format for tick val *x* at position *pos*s   text.usetexi    s   $0$s   $\mathdefault{0}$Rg   R(   i   g        s   %ds   %ss   $%s%s^{%.2f}$s   $\mathdefault{%s%s^{%.2f}}$s   $%s%s^{%d}$s   $\mathdefault{%s%s^{%d}}$N(   Rœ   R   Rz   R    R@   R¡   R�   t   nearest_long(	   R   R"   R#   Ri   t   usetexR¢   t	   is_decadet   sign_stringRž   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   Ú  s6    	
"
N(   R   R   R.   R   R$   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR¨   Õ  s   t   EngFormatterc           B  s¯   e  Z d  Z i d d 6d d 6d d 6d d 6d	 d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d! d" 6Z d d& d# „ Z d& d$ „ Z d% „  Z RS('   s�   
    Formats axis values using engineering prefixes to represent powers of 1000,
    plus a specified unit, e.g., 10 MHz instead of 1e7.
    t   yièÿÿÿt   ziëÿÿÿt   aiîÿÿÿRˆ   iñÿÿÿt   piôÿÿÿR2   i÷ÿÿÿu   Î¼iúÿÿÿt   miýÿÿÿR(   i    t   ki   t   Mi   t   Gi	   t   Ti   t   Pi   t   Ei   t   Zi   t   Yi   c         C  s   | |  _  | |  _ d  S(   N(   R   t   places(   R   R   R»   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR      s    	c         C  s)   d |  j  | ƒ |  j f } |  j | ƒ S(   Ns   %s%s(   t
   format_engR   R-   (   R   R"   R#   R,   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   $  s    c   	      C  sK  t  j t | ƒ ƒ } d } | d k  r7 d } | } n  | d k rr t  j t t j | j ƒ  d ƒ d ƒ ƒ } n t  j d ƒ } | j t |  j	 j
 ƒ  ƒ ƒ } | j t |  j	 j
 ƒ  ƒ ƒ } |  j	 t | ƒ } | | d | } |  j d	 k rú d } n7 |  j d k rd } n |  j d k r1d |  j } n  | | | f } | j ƒ  S(
   s_   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
        i   i    iÿÿÿÿi   i
   u   %g %su   %i %su
   %%.%if %%sN(   t   decimalt   DecimalR�   R3   Rz   R{   R|   R€   R   t   ENG_PREFIXESt   keysR»   R   t   strip(	   R   t   numt   dnumRO   t   pow10t   prefixt   mantt
   format_strt	   formatted(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR¼   (  s(    
/		N(   R   R   R.   R¿   R   R   R$   R¼   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR­     s,   
t   Locatorc           B  s\   e  Z d  Z d Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  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è  c         C  s   t  d ƒ ‚ d S(   sŸ  
        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]

        s   Derived must overrideN(   R!   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   tick_valuesk  s    c         C  s   t  d ƒ ‚ d S(   s!   Return the locations of the tickss   Derived must overrideN(   R!   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   |  s    c         C  sM   t  | ƒ |  j k rI d d t  | ƒ | d | d f } t | ƒ ‚ n  | S(   sU   raise a RuntimeError if Locator attempts to create more than
           MAXTICKS locss7   Locator attempting to generate %d ticks from %s to %s: s   exceeds Locator.MAXTICKSi    iÿÿÿÿ(   R1   t   MAXTICKSt   RuntimeError(   R   R*   t   msg(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   raise_if_exceeds‚  s
    "c         C  s   t  j | | ƒ S(   sŸ   
        select a scale for the range from vmin to vmax

        Normally this method is overridden by subclasses to
        change locator behaviour.
        (   R   R§   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   view_limitsŒ  s    c         C  s   |  j  |  j j ƒ  Œ  S(   s   autoscale the view limits(   RÏ   R   R   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt	   autoscale•  s    c         C  sÂ   |  ƒ  } t  | ƒ } |  j j ƒ  \ } } t j | | d d ƒ\ } } | d k rs | t | d | d ƒ } n t | | ƒ } | | d } | | 7} | | 7} |  j j | | d t ƒd S(	   s*   Pan numticks (can be positive or negative)R¦   gš™™™™™©?i   i    i   g      @t   ignoreN(   R1   R   R   R   R§   R@   R   RW   (   R   t   numstepst   tickst   numticksR   R   t   stepRD   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   pan™  s    	

c         C  sv   |  j  j ƒ  \ } } t j | | d d ƒ\ } } t | | ƒ } d | | } |  j  j | | | | d t ƒd S(   s>   Zoom in/out on axis; if direction is >0 zoom in, else zoom outR¦   gš™™™™™©?gš™™™™™¹?RÑ   N(   R   R   R   R§   R@   R   RW   (   R   t	   directionR   R   t   intervalRÕ   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   zoomª  s
    c         C  s   d S(   s1   refresh internal information based on current limN(    (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   refresh³  s    (   R   R   R.   RË   RÊ   R$   RÎ   RÏ   RÐ   RÖ   RÙ   RÚ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÉ   \  s   			
						t   IndexLocatorc           B  s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   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.
    c         C  s   | |  _  | |  _ d S(   s<   place ticks on the i-th data points where (i-offset)%base==0N(   Rœ   Ra   (   R   Rž   Ra   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ¿  s    	c         C  s%   |  j  j ƒ  \ } } |  j | | ƒ S(   s!   Return the locations of the ticks(   R   R   RÊ   (   R   t   dmint   dmax(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   Ä  s    c         C  s*   |  j  t j | |  j | d |  j ƒ ƒ S(   Ni   (   RÎ   Rx   t   arangeRa   Rœ   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   É  s    (   R   R   R.   R   R$   RÊ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÛ   ¸  s   		t   FixedLocatorc           B  s,   e  Z d  Z d d „ Z d „  Z d „  Z RS(   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.
    c         C  sF   t  j | ƒ |  _ | |  _ |  j d  k	 rB t |  j d ƒ |  _ n  d  S(   Ni   (   Rx   RŠ   R*   t   nbinsR   R   (   R   R*   Rà   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   Ù  s    	c         C  s   |  j  d  d  ƒ S(   N(   RÊ   R   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   ß  s    c         C  sË   |  j  d k r |  j St t d t |  j ƒ t |  j  ƒ ƒ d ƒ } |  j d d | … } x` t d | ƒ D]O } |  j | d | … } t j	 | ƒ j
 ƒ  t j	 | ƒ j
 ƒ  k  rk | } qk qk W|  j | ƒ S(   s«   "
        Return the locations of the ticks.

        .. note::

            Because the values are fixed, vmin and vmax are not used in this
            method.

        g®Gáz®ï?i   N(   Rà   R   R*   R   R3   R1   t   floatR�   Rx   R}   R€   RÎ   (   R   R   R   RÕ   RÓ   R4   t   ticks1(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   â  s    
/*N(   R   R   R.   R   R   R$   RÊ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRß   Î  s   		t   NullLocatorc           B  s    e  Z d  Z d „  Z d „  Z RS(   s   
    No ticks
    c         C  s   |  j  d  d  ƒ S(   N(   RÊ   R   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   ü  s    c         C  s   g  S(   s©   "
        Return the locations of the ticks.

        .. note::

            Because the values are Null, vmin and vmax are not used in this
            method.
        (    (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   ÿ  s    	(   R   R   R.   R$   RÊ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRã   ÷  s   	t   LinearLocatorc           B  sA   e  Z d  Z d d d „ Z d „  Z d „  Z d „  Z d „  Z RS(   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

    c         C  s.   | |  _  | d k r! i  |  _ n	 | |  _ d S(   sX   
        Use presets to set locs based on lom.  A dict mapping vmin, vmax->locs
        N(   RÔ   R   t   presets(   R   RÔ   Rå   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR     s    	c         C  s%   |  j  j ƒ  \ } } |  j | | ƒ S(   s!   Return the locations of the ticks(   R   R   RÊ   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$     s    c         C  s´   t  j | | d d ƒ\ } } | | k  r: | | } } n  | | f |  j k r` |  j | | f S|  j d  k r| |  j ƒ  n  |  j d k r� g  St j | | |  j ƒ } |  j | ƒ S(   NR¦   gš™™™™™©?i    (	   R   R§   Rå   RÔ   R   t   _set_numticksRx   t   linspaceRÎ   (   R   R   R   t   ticklocs(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   $  s    c         C  s   d |  _  d  S(   Ni   (   RÔ   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRæ   5  s    c         C  sÃ   | | k  r | | } } n  | | k r? | d 8} | d 7} n  t  t j | | ƒ d ƒ \ } } | d k  rz | d 8} n  d | } t j | | ƒ | } t j | | ƒ | } t j | | ƒ S(   s+   Try to choose the view limits intelligentlyi   g      à?i
   (   t   divmodRz   R|   R{   R~   R   R§   (   R   R   R   RP   t	   remaindert   scale(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÏ   8  s    
"N(	   R   R   R.   R   R   R$   RÊ   Ræ   RÏ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRä     s   	
			c         C  s"   t  |  | ƒ d k  r t St Sd  S(   Ng»½×Ùß|Û=(   R@   RW   R`   (   R"   R®   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   closetoM  s    t   Basec           B  sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sE   this solution has some hacks to deal with floating point inaccuraciesc         C  s   | d k s t  ‚ | |  _ d  S(   Ni    (   Rk   Rœ   (   R   Rž   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   V  s    c         C  sX   t  | |  j ƒ \ } } t | d ƒ rM t | |  j d ƒ rM | d |  j S| |  j S(   s'   return the largest multiple of base < xi    i   (   Ré   Rœ   Rì   (   R   R"   RD   R²   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   ltZ  s    &c         C  sH   t  | |  j ƒ \ } } t | |  j d ƒ r= | d |  j S| |  j S(   s(   return the largest multiple of base <= xi   (   Ré   Rœ   Rì   (   R   R"   RD   R²   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   lea  s    c         C  sL   t  | |  j ƒ \ } } t | |  j d ƒ r= | d |  j S| d |  j S(   s(   return the smallest multiple of base > xi   i   (   Ré   Rœ   Rì   (   R   R"   RD   R²   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   gti  s    c         C  sX   t  | |  j ƒ \ } } t | d ƒ rI t | |  j d ƒ rI | |  j S| d |  j S(   s)   return the smallest multiple of base >= xi    i   (   Ré   Rœ   Rì   (   R   R"   RD   R²   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   geq  s    &c         C  s   |  j  S(   N(   Rœ   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   get_basex  s    (	   R   R   R.   R   Rî   Rï   Rð   Rñ   Rò   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRí   T  s   					t   MultipleLocatorc           B  s5   e  Z d  Z d d „ Z d „  Z d „  Z d „  Z RS(   sW   
    Set a tick on every integer that is multiple of base in the
    view interval
    g      ð?c         C  s   t  | ƒ |  _ d  S(   N(   Rí   Rœ   (   R   Rž   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ‚  s    c         C  s%   |  j  j ƒ  \ } } |  j | | ƒ S(   s!   Return the locations of the ticks(   R   R   RÊ   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   …  s    c         C  s   | | k  r | | } } n  |  j  j | ƒ } |  j  j ƒ  } | | d | | } | | t j | d ƒ | } |  j | ƒ S(   Ngü©ñÒMbP?i   (   Rœ   Rñ   Rò   Rx   RÞ   RÎ   (   R   R   R   Rž   R2   R*   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   Š  s    c         C  sW   |  j  j | ƒ } |  j  j | ƒ } | | k rG | d 8} | d 7} n  t j | | ƒ S(   sd   
        Set the view limits to the nearest multiples of base that
        contain the data
        i   (   Rœ   Rï   Rñ   R   R§   (   R   RÜ   RÝ   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÏ   “  s    
(   R   R   R.   R   R$   RÊ   RÏ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRó   |  s
   			i   id   c   	      C  sÞ   t  | |  ƒ } | d k r  d Sd | |  } t  | ƒ | | k  rM d } n] | d k r‚ t t j | ƒ d ƒ d } d | } n( t t j | ƒ d ƒ d } d | } t t j | | ƒ d ƒ d } d | } | | f S(   Ni    g      ð?g        g      à?i   i
   (   g      ð?g        (   R@   Ré   Rz   R|   (	   R   R   R2   t	   thresholdt   dvt   meanvRa   t   exRë   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   scale_range¡  s    	 
t   MaxNLocatorc           B  sq   e  Z d  Z e d d d d d e d e d e d d ƒ Z d „  Z d	 „  Z	 d
 „  Z
 d „  Z d „  Z d „  Z RS(   s<   
    Select no more than N intervals at nice locations.
    Rà   i
   t   stepst   trimt   integert	   symmetrict   prunec         O  sY   | r8 | d | d <t  | ƒ d k r8 t d ƒ ‚ q8 n  |  j |  j �  |  j | �  d S(   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.

        i    Rà   i   s6   Keywords are required for all arguments except 'nbins'N(   R1   t
   ValueErrort
   set_paramst   default_params(   R   t   argsR   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   Á  s     c      
   K  s­  d | k r" t  | d ƒ |  _ n  d | k r> | d |  _ n  d | k rZ | d |  _ n  d | k rv | d |  _ n  d | k r¿ | d } | d  k	 r³ | d k r³ t d	 ƒ ‚ n  | |  _ n  d
 | k rI| d
 } | d  k rd d d d d d d d d d g
 |  _ qIt  | d ƒ d k r=t	 | ƒ } | j
 d ƒ n  | |  _ n  d | k re| d |  _ n  |  j r©g  |  j D]% } t | d ƒ d d k  rx| ^ qx|  _ n  d  S(   NRà   Rû   Rü   Rý   Rþ   t   uppert   lowert   boths/   prune must be 'upper', 'lower', 'both', or NoneRú   i   g      ø?i   g      @i   i   i   i   i   i
   iÿÿÿÿgü©ñÒMbP?(   s   uppers   lowerR  (   R3   t   _nbinst   _trimt   _integert
   _symmetricR   Rÿ   t   _prunet   _stepsR‰   t   appendRé   (   R   R   Rþ   Rú   R2   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   é  s4    

*	c         C  s)  |  j  } t | | | ƒ \ } } |  j r< t d | ƒ } n  | | } | | } | | | } | | } | } | }	 xb |  j D]W }
 |
 | k  r– q~ n  |
 | 9}
 |
 t | |
 ƒ d }	 |	 |
 | } | | k r~ Pq~ q~ W|  j rt t | | |
 ƒ d ƒ } | | 8} n  t j	 | d ƒ |
 |	 | S(   Ni   i    (
   R  Rø   R  R   R  Ré   R  R3   Rx   RÞ   (   R   R   R   Rà   Rë   Ra   t   raw_stept   scaled_raw_stept	   best_vmaxt	   best_vminRÕ   t
   extra_bins(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   bin_boundaries  s,    		



	c         C  s%   |  j  j ƒ  \ } } |  j | | ƒ S(   N(   R   R   RÊ   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$     s    c         C  sš   t  j | | d d d d ƒ\ } } |  j | | ƒ } |  j } | d k rX | d } n5 | d k rq | d  } n | d	 k r� | d d !} n  |  j | ƒ S(
   NR¦   g‚vIhÂ%<=t   tinyg›+¡†›„=R  i   R  iÿÿÿÿR  (   R   R§   R  R
  RÎ   (   R   R   R   R*   Rþ   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   #  s    	c         C  sz   |  j  r4 t t | ƒ t | ƒ ƒ } | } | } n  t j | | d d d d ƒ\ } } t j |  j | | ƒ d d g ƒ S(   NR¦   gê-�™—q=R  g‚vIhÂ%<=i    iÿÿÿÿ(   R	  R   R@   R   R§   Rx   t   takeR  (   R   RÜ   RÝ   t   maxabs(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÏ   0  s    		N(   R   R   R.   t   dictR   RW   R`   R  R   R   R  R$   RÊ   RÏ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRù   ¶  s   		(				i
   c         C  s>   |  d k r | St  j t  j |  ƒ t  j | ƒ ƒ } | | S(   s#   floor x to the nearest lower decadeg        (   Rx   R{   R    (   R"   Rž   t   lx(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   decade_down:  s    %c         C  s=   |  d k r | St  j t  j |  ƒ t  j | ƒ ƒ } | | S(   s#   ceil x to the nearest higher decadeg        (   Rx   R~   R    (   R"   Rž   R  (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt	   decade_upB  s    %c         C  s<   |  d k r d S|  d k r* t  |  d ƒ St  |  d ƒ Sd  S(   Ni    l    g      à?(   t   long(   R"   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR©   J  s
    c         C  sR   t  j |  ƒ s t S|  d k r# t St  j t  j |  ƒ ƒ t  j | ƒ } t | ƒ S(   Ng        (   Rx   t   isfiniteR`   RW   R    R@   R¡   (   R"   Rž   R  (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR«   S  s    %c         C  s-   t  j |  ƒ s t St |  t |  ƒ ƒ d k  S(   Ng»½×Ùß|Û=(   Rx   R  R`   R@   R©   (   R"   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR¡   \  s    t
   LogLocatorc           B  sS   e  Z d  Z d d g d d d „ Z d „  Z d „  Z d „  Z d	 „  Z d
 „  Z RS(   s3   
    Determine the tick locations for log axes
    g      $@g      ð?i   i   c         C  s0   |  j  | ƒ |  j | ƒ | |  _ | |  _ d S(   s>   
        place ticks on the location= base**i*subs[j]
        N(   Rž   t   subsRÔ   t   numdecs(   R   Rž   R  R  RÔ   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   g  s    	c         C  s   | d |  _  d S(   sW   
        set the base of the log scaling (major tick every base**i, i integer)
        g        N(   Rœ   (   R   Rž   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRž   p  s    c         C  s2   | d k r d |  _ n t j | ƒ d |  _ d S(   sK   
        set the minor ticks the log scaling every base**i*subs[j]
        g        N(   R   t   _subsRx   RŠ   (   R   R  (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR  v  s    c         C  s%   |  j  j ƒ  \ } } |  j | | ƒ S(   s!   Return the locations of the ticks(   R   R   RÊ   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$     s    c   
      C  s  |  j  } t |  j d ƒ r| |  j j j d k r| t j t j | ƒ t j | ƒ ƒ } t j	 | |  j
 | ƒ } | | } | S| d k r× |  j d  k	 r© |  j j ƒ  } n  | d k sÅ t j | ƒ r× t d ƒ ‚ q× n  t j | ƒ t j | ƒ } t j | ƒ t j | ƒ } | | k  r+| | } } n  t j | ƒ t j | ƒ } |  j d  k r°| d k rwt j d g ƒ } q¹| d k r›t j	 d | d ƒ } q¹t j	 d | ƒ } n	 |  j } d	 } x% | | d	 |  j k ræ| d	 7} qÂWt j	 t j | ƒ | t j | ƒ d
 | | ƒ } t |  d ƒ r–|  j j ƒ  j | ƒ } t | ƒ d	 k sut | d	 k ƒ r| d d k rt j t j | | ƒ ƒ } qnm t | ƒ d	 k sÊt | d	 k ƒ rù| d d k rùg  } x0 | | D] }	 | j | |	 ƒ qÛWn
 | | } |  j t j | ƒ ƒ S(   Nt   axest   polarg        sA   Data has no positive values, and therefore can not be log-scaled.i
   g      ð?i   g       @i   i   t
   _transformi    (   Rœ   t   hasattrR   R   t   nameRz   R~   R    Rx   RÞ   R  R   R   R  Rÿ   R{   R  t   arrayRÔ   R"  t   invertedt	   transformR1   t   ravelt   outert   extendRÎ   RŠ   (
   R   R   R   Ri   t   decadesRè   t   numdecR  t   stridet   decadeStart(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   „  sN    	'%
	4!4
c         C  s`  |  j  } | | k  r% | | } } n  |  j j j d k rz t j t j | ƒ t j | ƒ ƒ } | | |  j } | | f S|  j j ƒ  } | d k s¥ t	 j
 | ƒ r´ t d ƒ ‚ n  | | k rÉ | } n  t | |  j  ƒ sð t | |  j  ƒ } n  t | |  j  ƒ st | |  j  ƒ } n  | | k rJt | |  j  ƒ } t | |  j  ƒ } n  t j | | ƒ } | S(   s+   Try to choose the view limits intelligentlyR!  i    sA   Data has no positive values, and therefore can not be log-scaled.(   Rœ   R   R   R$  Rz   R~   R    R  R   Rx   R  Rÿ   R«   R  R  R   R§   (   R   R   R   Ri   R   t   result(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÏ   ½  s,    	%
	(	   R   R   R.   R   Rž   R  R$   RÊ   RÏ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR  b  s   						9t   SymmetricalLogLocatorc           B  s5   e  Z d  Z d d „ Z d „  Z d „  Z d „  Z RS(   s3   
    Determine the tick locations for log axes
    c         C  s:   | |  _  | d k r$ d g |  _ n	 | |  _ d |  _ d S(   s>   
        place ticks on the location= base**i*subs[j]
        g      ð?i   N(   R"  R   R  RÔ   (   R   R'  R  (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ä  s
    		c         C  s%   |  j  j ƒ  \ } } |  j | | ƒ S(   s!   Return the locations of the ticks(   R   R   RÊ   (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   ï  s    c           s  |  j  j ‰  |  j  j } | | k  r4 | | } } n  t } } } | | k  rƒ t } | | k r t } | | k r€ t } q€ q n} | d k  rÆ | d k r¹ t } | | k rÃ t } qÃ q | | g Sn: | | k  rú | | k rí t } t } q | | g Sn t } ‡  f d †  } | rJ| r2| | | d ƒ } qP| | | d ƒ } n d } | rˆ| rr| | | d ƒ }	 qŽ| | | d ƒ }	 n d	 }	 | d | d |	 d |	 d }
 | rÃ|
 d 7}
 n  t t j t |
 ƒ |  j	 d ƒ d ƒ } g  } | r4| j
 d ˆ  t j | d | d | ƒ d  d  d … ƒ n  | rJ| j d ƒ n  | r{| j
 ˆ  t j |	 d |	 d | ƒ ƒ n  |  j d  k rŸt j d ˆ  ƒ } n t j |  j ƒ } t | ƒ d k sÓ| d d k rþg  } x( | D] } | j
 | | ƒ qàWn | } |  j t j | ƒ ƒ S(
   Ni    c           sT   t  j t  j |  ƒ t  j ˆ  ƒ ƒ }  t  j t  j | ƒ t  j ˆ  ƒ ƒ } |  | f S(   N(   Rx   R{   R    R~   (   t   lot   hi(   Ri   (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   get_log_range'  s    %%i   iÿÿÿÿg        g       @g      ð?(   i    i    (   i    i    (   R"  Rž   t	   linthreshR`   RW   R   Rx   R{   Rá   RÔ   R*  RÞ   R  R  R   RŠ   R1   RÎ   R%  (   R   R   R   t   tt   has_at   has_bt   has_cR3  t   a_ranget   c_ranget   total_ticksR-  R+  R  Rè   t   decade(    (   Ri   sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   õ  sn    	") +"c         C  s*  |  j  j } | | k  r( | | } } n  t t | ƒ | ƒ so | d k  r] t | | ƒ } qo t | | ƒ } n  t t | ƒ | ƒ s¶ | d k  r¤ t | | ƒ } q¶ t | | ƒ } n  | | k r| d k  ró t | | ƒ } t | | ƒ } qt | | ƒ } t | | ƒ } n  t j | | ƒ } | S(   s+   Try to choose the view limits intelligentlyi    (   R"  Rž   R«   R@   R  R  R   R§   (   R   R   R   Ri   R/  (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÏ   \  s&    N(   R   R   R.   R   R   R$   RÊ   RÏ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR0  ß  s
   		gt   AutoLocatorc           B  s   e  Z d  „  Z RS(   c      	   C  s)   t  j |  d d d d d d d g ƒd  S(   NRà   i	   Rú   i   i   i   i
   (   Rù   R   (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   y  s    (   R   R   R   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR=  x  s   t   AutoMinorLocatorc           B  s,   e  Z d  Z d d „ Z d „  Z d „  Z RS(   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  s   | |  _  d S(   së   
        *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(   t   ndivs(   R   R2   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   ƒ  s    c         C  s¢  |  j  j ƒ  } y | d | d } Wn t k
 r> d } n X|  j d k r¤ | d k rc d } q­ t t d t j | ƒ d ƒ ƒ } | d k r› d } q­ d } n	 |  j } | | } |  j  j	 ƒ  \ } } | | k rè | | } } n  t
 | ƒ d k r†| d } t j | | | ƒ | }	 t j | | | ƒ | }
 t j |	 |
 | ƒ | } t j | | | ƒ | d k } | j | ƒ } n g  } |  j t j | ƒ ƒ S(	   s!   Return the locations of the ticksi   i    i
   i   i   g      $@N(   i   i   i
   (   R   t   get_majorticklocsR˜   R?  R   R3   RŒ   Rx   R|   R   R1   R~   R{   RÞ   R@   t   compressRÎ   R%  (   R   t	   majorlocst	   majorstepR?  R"   t	   minorstepR   R   t   t0t   tmint   tmaxR*   t   cond(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   �  s4    
	#			

!c         C  s   t  d t |  ƒ ƒ ‚ d  S(   Ns(   Cannot get tick locations for a %s type.(   R!   t   type(   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   ¸  s    N(   R   R   R.   R   R   R$   RÊ   (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR>  }  s   
	+t   OldAutoLocatorc           B  sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   so   
    On autoscale this class picks the best MultipleLocator to set the
    view limits and the tick locs.

    c         C  s   t  ƒ  |  _ d  S(   N(   Rä   t   _locator(   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR   Ã  s    c         C  s   |  j  ƒ  |  j |  j ƒ  ƒ S(   s!   Return the locations of the ticks(   RÚ   RÎ   RK  (   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyR$   Æ  s    
c         C  s   t  d t |  ƒ ƒ ‚ d  S(   Ns(   Cannot get tick locations for a %s type.(   R!   RI  (   R   R   R   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÊ   Ë  s    c         C  sY   |  j  j ƒ  \ } } t j | | d d ƒ\ } } t | | ƒ } |  j | ƒ |  _ d S(   s1   refresh internal information based on current limR¦   gš™™™™™©?N(   R   R   R   R§   R@   t   get_locatorRK  (   R   R   R   RD   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÚ   Ï  s    c         C  s5   t  | | ƒ } |  j | ƒ |  _ |  j j | | ƒ S(   s+   Try to choose the view limits intelligently(   R@   RL  RK  RÏ   (   R   R   R   RD   (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRÏ   Ö  s    c         C  sÃ   t  | ƒ } | d k r' t d ƒ } n˜ y t j | ƒ } Wn t k
 rY t d ƒ ‚ n Xt j | ƒ } d | } | d | k rŒ | } n' | d | k r© | d } n
 | d } t | ƒ } | S(	   s)   pick the best locator based on a distancei    gš™™™™™É?s'   AutoLocator illegal data interval rangei
   i   i   g       @g      @(   R@   Ró   Rz   R|   t   OverflowErrorRÌ   R{   (   R   RD   t   locatort   ldt   fldRž   t   ticksize(    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRL  Ý  s     
	
(	   R   R   R.   R   R$   RÊ   RÚ   RÏ   RL  (    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyRJ  ½  s   					(2   R.   t
   __future__R    R   R½   Rn   Rz   t   numpyRx   t
   matplotlibR   R   R   R   t   objectR   R   R    R/   R5   R6   R;   R=   R?   RQ   R›   R¥   R¨   R­   RÉ   RÛ   Rß   Rã   Rä   Rì   Rí   Ró   Rø   Rù   R  R  R©   R«   R¡   R  R0  R=  R>  RJ  t   __all__(    (    (    sK   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/ticker.pyt   <module>{   sd   -+ÿ Y#0W\)B	(%„				}™@=						