
 m[c           @` s^  d  Z  d d l m Z m Z m Z m Z d d l Z d d l Z d d l m	 Z	 d d l
 j Z d d l
 m Z d d l j Z d d l m Z d d l j Z d d l j Z d d l j Z d d l j Z d d l j Z d d l j Z  d d l! j" Z# d d l$ j% Z& d d l' Z( d d l) Z) e j* e+  Z, d Z- e j. e j/  Z0 e0 j1   Z2 g  e0 j3 j4   D] Z5 e6 e5 j7    d ^ qaZ8 g  e2 e8 D] Z9 d e9 ^ qZ: d	 e j; f d
     YZ< d e< f d     YZ= d e< f d     YZ> d e? f d     YZ@ d e? f d     YZA d e j; f d     YZB d eB f d     YZC d eB f d     YZD d S(   u(   
Classes for the ticks and x and y axis
i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsN(   t   rcParams(   t   allow_rasterization(   t   _string_to_booli   u   grid_t   Tickc           B` sR  e  Z d  Z d d d d d d d d d e e e e e d d d d d d  Z d   Z d   Z d   Z	 d   Z
 d   Z d d  Z e j j j e _ d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z e d    Z d   Z e Z d   Z d   Z d   Z d   Z  d   Z! d   Z" d   Z# RS(   u  
    Abstract base class for the axis ticks, grid lines and labels

    1 refers to the bottom of the plot for xticks and the left for yticks
    2 refers to the top of the plot for xticks and the right for yticks

    Attributes
    ----------
    tick1line : Line2D

    tick2line : Line2D

    gridline : Line2D

    label1 : Text

    label2 : Text

    gridOn : bool
        Determines whether to draw the tickline.

    tick1On : bool
        Determines whether to draw the first tickline.

    tick2On : bool
        Determines whether to draw the second tickline.

    label1On : bool
        Determines whether to draw the first tick label.

    label2On : bool
        Determines whether to draw the second tick label.
    i    c         K` sP  t  j j |   | d k rl | r? t d d k r? t d } ql | rc t d d k rc t d } ql t } n  |  j | j  | |  _ |  j	 j
   } | |  _ | |  _ | d k r | r t d | } q t d | } n  | |  _ | d k r| rt d | } qt d	 | } n  | |  _ | d k r=t d
 | } n  | |  _ | d k rz| rit d | } qzt d | } n  | |  _ |
 d k rt d
 | }
 n  |
 |  _ |	 d k rt d | }	 n  |	 |  _ |  j |  | d k r| rt j j d } qt j j } n  | |  _ | d k r/t d n | |  _ | d k rNt d n | |  _ | d k rmt d n | |  _ | d k rt d n | |  _ d   | j   D |  _ |  j |  |  j   |  _  |  j!   |  _" |  j#   |  _$ |  j%   |  _& |  j& |  _' |  j(   |  _) | |  _* | |  _+ | |  _, | |  _- | |  _. |  j/ |  d S(   u   
        bbox is the Bound2D bounding box in display coords of the Axes
        loc is the tick location in data coords
        size is the tick size in points
        u   axes.grid.whichu   bothu   majoru	   axes.gridu   minoru   %s.major.sizeu   %s.minor.sizeu   %s.major.widthu   %s.minor.widthu   %s.coloru   %s.major.padu   %s.minor.padu   %s.labelsizeg{Gz?u
   grid.coloru   grid.linestyleu   grid.linewidthu
   grid.alphac         S` s#   i  |  ] \ } } | | d   q S(   i   (    (   t   .0t   kt   v(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pys
   <dictcomp>   s   	 N(   u   bothu   major(   u   bothu   minor(0   t   artistt   Artistt   __init__t   NoneR   t   Falset
   set_figuret   figuret   axest   __name__t   lowert   _namet   _loct   _sizet   _widtht   _colort	   _base_padt   _labelcolort
   _labelsizet   _set_labelrotationt   mlinest   Line2Dt   zordert   _zordert   _grid_colort   _grid_linestylet   _grid_linewidtht   _grid_alphat   itemst   _grid_kwt   apply_tickdirt   _get_tick1linet	   tick1linet   _get_tick2linet	   tick2linet   _get_gridlinet   gridlinet
   _get_text1t   label1t   labelt
   _get_text2t   label2t   gridOnt   tick1Ont   tick2Ont   label1Ont   label2Ont   update_position(   t   selfR   t   locR1   t   sizet   widtht   colort   tickdirt   padt	   labelsizet
   labelcolorR    R4   R5   R6   R7   R8   t   majort   labelrotationt
   grid_colort   grid_linestylet   grid_linewidtht
   grid_alphat   kwt   name(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   J   sz    																	c         C` s   t  | t j  r! | } d } n0 t  | t t f  rE | \ } } n d } | } | d k ru t d j |    n  | | f |  _ d  S(   Ni    u   defaultu   autou:   Label rotation mode must be 'default' or 'auto', not '{}'.(   u   autou   default(   t
   isinstancet   sixt   string_typest   tuplet   listt
   ValueErrort   formatt   _labelrotation(   R:   RD   t   modet   angle(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR      s    		c         C` s   d S(   u;   
        Calculate self._pad and self._tickmarkers
        N(    (   R:   R?   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR(      s    c         C` s   |  j  S(   N(   t   _tickdir(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_tickdir   s    c         C` s-   i d d 6d d 6d d 6} |  j  | |  j S(   uA   
        Get the length of the tick outside of the axes.
        g        u   ing      ?u   inoutg      ?u   out(   R   RU   (   R:   t   padding(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_tick_padding   s
    
c         C` s(   |  j  |  j |  j |  j |  j g } | S(   N(   R*   R,   R.   R0   R3   (   R:   t   children(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_children   s    c         C` s6   t  j j |  | |  |  j j | |  t |  _ d  S(   N(   R   R   t   set_clip_pathR.   t   Truet   stale(   R:   t   clippatht	   transform(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR[      s    c         C` s   |  j  j |  j d S(   Ng      R@(   R   t   dpiR   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_pad_pixels   s    c         C` s)   t  |  j  r |  j |  |  St i  f S(   u   
        Test whether the mouse event occurred in the Tick marks.

        This function always returns false.  It is more useful to test if the
        axis as a whole contains the mouse rather than the set of tick marks.
        (   t   callablet	   _containsR   (   R:   t
   mouseevent(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   contains   s    c         C` s   |  j  d |  t |  _ d S(   uJ   
        Set the tick label pad in points

        ACCEPTS: float
        R@   N(   t   _apply_paramsR\   R]   (   R:   t   val(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_pad   s    c         C` s   |  j  S(   u-   Get the value of the tick label pad in points(   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_pad  s    c         C` s   d S(   u   Get the default Text 1 instanceN(    (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR/   	  s    c         C` s   d S(   u   Get the default Text 2 instanceN(    (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR2     s    c         C` s   d S(   u)   Get the default line2D instance for tick1N(    (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR)     s    c         C` s   d S(   u)   Get the default line2D instance for tick2N(    (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR+     s    c         C` s   d S(   u2   Get the default grid Line2d instance for this tickN(    (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR-     s    c         C` s   |  j  S(   u2   Return the tick location (data coords) as a scalar(   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_loc  s    c         C` s   |  j    s t |  _ d  S| j |  j  |  j rE |  j j |  n  |  j ra |  j	 j |  n  |  j
 r} |  j j |  n  |  j r |  j j |  n  |  j r |  j j |  n  | j |  j  t |  _ d  S(   N(   t   get_visibleR   R]   t
   open_groupR   R4   R.   t   drawR5   R*   R6   R,   R7   R0   R8   R3   t   close_group(   R:   t   renderer(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRm   !  s     						c         C` s   |  j  j |  t |  _ d S(   uA   
        Set the text of ticklabel

        ACCEPTS: str
        N(   R0   t   set_textR\   R]   (   R:   t   s(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt
   set_label17  s    c         C` s   |  j  j |  t |  _ d S(   uB   
        Set the text of ticklabel2

        ACCEPTS: str
        N(   R3   Rp   R\   R]   (   R:   Rq   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt
   set_label2B  s    c         C` s   | j  |  j  d  S(   N(   R   R   (   R:   t   a(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   _set_artist_propsK  s    c         C` s   t  d   d S(   uC   return the view Interval instance for the axis this tick is tickingu   Derived must overrideN(   t   NotImplementedError(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_view_intervalN  s    c         K` s  d d d d d g } g  | D] } | | k r | ^ q } x' | D] } t  |  | | j |   qA Wg  | D] } | d k rk | ^ qk } | r| j d |  j  |  _ | j d |  j  |  _ | j d |  j  |  _ |  j | j d	 |  j   |  j j |  j	 d
  |  j
 j |  j	 d  x: |  j |  j
 f D]& } | j |  j  | j |  j  q4W|  j   d
 } |  j j |  |  j   d
 } |  j j |  n  d   t j |  D } | r|  j j |   |  j
 j |   x4 t j |  D]  \ } }	 t  |  d | |	  qWn  d | k rp|  j | j d   |  j j d |  j d  |  j j d |  j d  n  g  t j |  D] } | d
 d k r| ^ q}
 |
 r(d   |
 D } |  j j |   |  j j |   xM t j |  D]9 \ } }	 t |  j d |    }	 t  |  d | |	  qWn  g  t j |  D] } | d
 t k r8| ^ q8} | rd   | D } |  j j |   x4 t j |  D]  \ } }	 t  |  d | |	  qWn  d  S(   Nu   gridOnu   tick1Onu   tick2Onu   label1Onu   label2Onu   sizeu   widthu   padu   tickdiri    i   c         S` s+   i  |  ]! \ } } | d k r | |  q S(   u   coloru   zorder(   u   coloru   zorder(    (   R   R	   R
   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pys
   <dictcomp>k  s   	 	u   _u   labelrotationt   rotationu	   labelsizeu
   labelcolorc         S` s#   i  |  ] \ } } | | d   q S(   i   (    (   R   R	   R
   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pys
   <dictcomp>{  s   	 u   get_u   _labelc         S` s#   i  |  ] \ } } | | d   q S(   i   (    (   R   R	   R
   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pys
   <dictcomp>  s   	 u   _grid_(   u   sizeu   widthu   padu   tickdir(   u	   labelsizeu
   labelcolor(   t   setattrt   popR   R   R   R(   RU   R*   t
   set_markert   _tickmarkersR,   t   set_markersizet   set_markeredgewidtht   _get_text1_transformR0   t   set_transformt   _get_text2_transformR3   RL   t	   iteritemst   setR   RR   t   getattrt   _gridline_param_namesR.   (   R:   RI   t   switchkwR	   t   switchest	   newmarkert   linet   transt   tick_kwR
   t
   label_listt   label_kwt	   grid_listt   grid_kw(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRf   R  sZ    %%c         C` s   t  d   d S(   u9   Set the location of tick in data coords with scalar *loc*u   Derived must overrideN(   Rv   (   R:   R;   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR9     s    c         C` s   t  d   d  S(   Nu   Derived must override(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s   t  d   d  S(   Nu   Derived must override(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    N($   R   t
   __module__t   __doc__R   R\   R   R   R   R(   RV   RX   RZ   R[   R   R   Ra   Re   Rh   Ri   R/   R2   R)   R+   R-   Rj   R   Rm   Rr   t	   set_labelRs   Ru   Rw   Rf   R9   R   R   (    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   (   s^   !b																							;		t   XTickc           B` sn   e  Z 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(   uq   
    Contains all the Artists needed to make an x tick - the tick line,
    the label text and the grid line
    u   xtickc         C` s   |  j  j |  j  S(   N(   R   t   get_xaxis_text1_transformt   _pad(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s   |  j  j |  j  S(   N(   R   t   get_xaxis_text2_transformR   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s   | d  k r  t d |  j } n  | |  _ |  j d k rP t j t j f |  _ n0 |  j d k rk d |  _ n t j t j f |  _ |  j |  j	   |  _
 t |  _ d  S(   Nu   %s.directionu   inu   inoutu   |(   u   |u   |(   R   R   R   RU   R   t   TICKUPt   TICKDOWNR|   R   RX   R   R\   R]   (   R:   R?   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR(     s    	c         C` su   |  j    \ } } } t j d d d d d t j d |  j  d |  j d | d |  } | j |  |  j |  | S(	   u   Get the default Text instancet   xi    t   yt   fontpropertiesR<   R>   t   verticalalignmentt   horizontalalignment(	   R   t   mtextt   Textt   font_managert   FontPropertiesR   R   R   Ru   (   R:   R   t   vertt   horizt   t(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR/     s    			c         C` su   |  j    \ } } } t j d d d d d t j d |  j  d |  j d | d	 |  } | j |  |  j |  | S(
   u   Get the default Text 2 instanceR   i    R   i   R   R<   R>   R   R   (	   R   R   R   R   R   R   R   R   Ru   (   R:   R   R   R   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR2     s    			c         C` s|   t  j d d d d d |  j d d d |  j d d |  j d	 |  j d
 |  j  } | j |  j j	 d d   |  j
 |  | S(   u   Get the default line2D instancet   xdatai    t   ydataR>   t	   linestyleu   Nonet   markert
   markersizet   markeredgewidthR    t   whichu   tick1(   i    (   i    (   R   R   R   R|   R   R   R!   R   R   t   get_xaxis_transformRu   (   R:   t   l(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR)     s    	c         C` s|   t  j d d d d d |  j d d d |  j d d	 |  j d
 |  j d |  j  } | j |  j j	 d d   |  j
 |  | S(   u   Get the default line2D instanceR   i    R   i   R>   R   u   NoneR   R   R   R    R   u   tick2(   i    (   i   (   R   R   R   R|   R   R   R!   R   R   R   Ru   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR+     s    			c         C` s   t  j d d d d d |  j d |  j d |  j d	 |  j d
 d |  j  } | j |  j j	 d d   t
 | j   _ |  j |  | S(   u   Get the default line2D instanceR   g        R   i    g      ?R>   R   t	   linewidtht   alphaR   R   u   grid(   g        g        (   i    g      ?(   R   R   R"   R#   R$   R%   R'   R   R   R   t   GRIDLINE_INTERPOLATION_STEPSt   get_patht   _interpolation_stepsRu   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR-     s    				c         C` s   |  j  r |  j j | f  n  |  j r> |  j j | f  n  |  j r] |  j j | f  n  |  j ry |  j j	 |  n  |  j
 r |  j j	 |  n  | |  _ t |  _ d S(   u9   Set the location of tick in data coords with scalar *loc*N(   R5   R*   t	   set_xdataR6   R,   R4   R.   R7   R0   t   set_xR8   R3   R   R\   R]   (   R:   R;   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR9     s    						c         C` s   |  j  j j S(   u6   return the Interval instance for this axis view limits(   R   t   viewLimt	   intervalx(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRw     s    (   R   R   R   R   R   R(   R/   R2   R)   R+   R-   R9   Rw   (    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s   									t   YTickc           B` sn   e  Z 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(   up   
    Contains all the Artists needed to make a Y tick - the tick line,
    the label text and the grid line
    u   ytickc         C` s   |  j  j |  j  S(   N(   R   t   get_yaxis_text1_transformR   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s   |  j  j |  j  S(   N(   R   t   get_yaxis_text2_transformR   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s   | d  k r  t d |  j } n  | |  _ |  j d k rP t j t j f |  _ n0 |  j d k rk d |  _ n t j t j f |  _ |  j |  j	   |  _
 t |  _ d  S(   Nu   %s.directionu   inu   inoutu   _(   u   _u   _(   R   R   R   RU   R   t	   TICKRIGHTt   TICKLEFTR|   R   RX   R   R\   R]   (   R:   R?   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR(      s    	c         C` su   |  j    \ } } } t j d d d d d t j d |  j  d |  j d | d |  } | j |  |  j |  | S(	   u   Get the default Text instanceR   i    R   R   R<   R>   R   R   (	   R   R   R   R   R   R   R   R   Ru   (   R:   R   R   R   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR/   /  s    			c         C` su   |  j    \ } } } t j d d d d d t j d |  j  d |  j d | d	 |  } | j |  |  j |  | S(
   u   Get the default Text instanceR   i   R   i    R   R<   R>   R   R   (	   R   R   R   R   R   R   R   R   Ru   (   R:   R   R   R   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR2   >  s    			c         C` sv   t  j d d d |  j d |  j d d d d |  j d |  j d |  j } | j |  j j	 d	 d
   |  j
 |  | S(   u   Get the default line2D instancei    R>   R   R   u   NoneR   R   R    R   u   tick1(   i    (   i    (   R   R   R   R|   R   R   R!   R   R   t   get_yaxis_transformRu   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR)   M  s    			c         C` sv   t  j d d d |  j d |  j d d d d |  j d |  j d	 |  j } | j |  j j	 d
 d   |  j
 |  | S(   u   Get the default line2D instancei   i    R>   R   R   u   NoneR   R   R    R   u   tick2(   i   (   i    (   R   R   R   R|   R   R   R!   R   R   R   Ru   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR+   \  s    			c         C` s   t  j d d d d d |  j d |  j d |  j d |  j d	 d |  j  } | j |  j j	 d
 d   t
 | j   _ |  j |  | S(   u   Get the default line2D instanceR   i    i   R   R>   R   R   R   R   R   u   grid(   i    i   (   i    i    (   R   R   R"   R#   R$   R%   R'   R   R   R   R   R   R   Ru   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR-   j  s    				c         C` s   |  j  r |  j j | f  n  |  j r> |  j j | f  n  |  j r] |  j j | f  n  |  j ry |  j j	 |  n  |  j
 r |  j j	 |  n  | |  _ t |  _ d S(   u9   Set the location of tick in data coords with scalar *loc*N(   R5   R*   t	   set_ydataR6   R,   R4   R.   R7   R0   t   set_yR8   R3   R   R\   R]   (   R:   R;   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR9   y  s    						c         C` s   |  j  j j S(   u6   return the Interval instance for this axis view limits(   R   R   t	   intervaly(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRw     s    (   R   R   R   R   R   R(   R/   R2   R)   R+   R-   R9   Rw   (    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s   									t   Tickerc           B` s   e  Z d  Z d  Z RS(   N(   R   R   R   t   locatort	   formatter(    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s   t   _LazyTickListc           B` s    e  Z d  Z d   Z d   Z RS(   u   
    A descriptor for lazy instantiation of tick lists.

    See comment above definition of the ``majorTicks`` and ``minorTicks``
    attributes.
    c         C` s   | |  _  d  S(   N(   t   _major(   R:   RC   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s   | d  k r |  S|  j rK g  | _ | j d t  } | j j |  | j Sg  | _ | j d t  } | j j |  | j Sd  S(   NRC   (   R   R   t
   majorTickst	   _get_tickR\   t   appendt
   minorTicksR   (   R:   t   instancet   clst   tick(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   __get__  s    			(   R   R   R   R   R   (    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s   	t   Axisc           B` st  e  Z d  Z d Z d   Z d d  Z e d e  Z e d e	  Z
 dV d  Z d   Z d   Z d	   Z d
   Z e e j d  d     Z e j e j d  d     Z d   Z d   Z d   Z d e	 d  Z e e d   Z dV d  Z d   Z e	 d  Z d   Z d   Z  d   Z! d   Z" d   Z# d   Z$ d   Z% d   Z& d   Z' d    Z( d!   Z) d"   Z* e+ d#    Z, d$   Z- d%   Z. d&   Z/ d'   Z0 d(   Z1 d)   Z2 d*   Z3 d+   Z4 e	 dV d,  Z5 d-   Z6 d.   Z7 e	 d/  Z8 d0   Z9 d1   Z: e	 d2  Z; e	 d3  Z< d4   Z= d5   Z> d6   Z? d7   Z@ d8   ZA d9   ZB d:   ZC dV d;  ZD dV d<  ZE dV d d=  ZF d>   ZG d?   ZH d@   ZI dA   ZJ dB   ZK dC   ZL dV dD  ZM dE   ZN dF   ZO dG   ZP dH   ZQ dI   ZR dJ   ZS e	 dK  ZT dL   ZU dM   ZV dN   ZW dO   ZX dP   ZY dV dQ  ZZ dR   Z[ dS   Z\ dT   Z] dU   Z^ RS(W   u   
    Public attributes

    * :attr:`axes.transData` - transform data coords to display coords
    * :attr:`axes.transAxes` - transform axis coords to display coords
    * :attr:`labelpad` - number of points between the axis and its label
    i   c         C` s'   |  j  j d t |  j j j d   S(   Nu   (%f,%f)i    (   i    i    (   t	   __class__R   RN   R   t	   transAxest   transform_point(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   __str__  s    	i   c         C` s   t  j j |   |  j | j  t |  _ | |  _ t   |  _	 t   |  _
 t j   |  _ t |  _ t |  _ |  j   |  _ t d |  _ |  j   |  _ | |  _ t   |  _ t   |  _ |  j   |  j d  d S(   u=   
        Init the axis with the parent Axes instance
        u   axes.labelpadu   linearN(   R   R   R   R   R   R\   t   isDefault_labelR   R   RC   t   minort   cbookt   CallbackRegistryt	   callbackst   _autolabelposR   t   _smart_boundst
   _get_labelR1   R   t   labelpadt   _get_offset_textt
   offsetTextt
   pickradiust   dictt   _major_tick_kwt   _minor_tick_kwt   clat
   _set_scale(   R:   R   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s"    					
RC   c         C` sW   t  |  _ | d k r$ |  j j } n  |  j j |  |  j j | | f  t |  _	 d S(   u  
        Set the coordinates of the label.  By default, the x
        coordinate of the y label is determined by the tick label
        bounding boxes, but this can lead to poor alignment of
        multiple ylabels if there are multiple axes.  Ditto for the y
        coordinate of the x label.

        You can also specify the coordinate system of the label with
        the transform.  If None, the default coordinate system will be
        the axes coordinate system (0,0) is (left,bottom), (0.5, 0.5)
        is middle, etc

        N(
   R   R   R   R   R   R1   R   t   set_positionR\   R]   (   R:   R   R   R_   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_label_coords  s    	c         C` s   |  j  j   S(   N(   t   _scalet   get_transform(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s
   |  j  j S(   N(   R   RJ   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt	   get_scale  s    c         K` sP   t  j | |  |  |  _ |  j j |   t |  _ t |  _ t |  _ t |  _ d  S(   N(	   t   mscalet   scale_factoryR   t#   set_default_locators_and_formattersR\   t   isDefault_majloct   isDefault_minloct   isDefault_majfmtt   isDefault_minfmt(   R:   t   valuet   kwargs(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    			c         C` s   |  j  j | | |  j    S(   N(   R   t   limit_range_for_scalet
   get_minpos(   R:   t   vmint   vmax(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    u   2.2.0c         C` s   |  j  S(   N(   t   units(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt	   unit_data  s    c         C` s   |  j  |  d  S(   N(   t	   set_units(   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` sH   |  j  |  j g } |  j   } |  j   } | j |  | j |  | S(   N(   R1   R   t   get_major_tickst   get_minor_tickst   extend(   R:   RY   t
   majortickst
   minorticks(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRZ     s    c         C` s   |  j  j d  |  j d  t j   |  _ t d oC t d d	 k |  _ t d o` t d d
 k |  _ |  j	   d |  _ d |  _ |  j d  t |  _ d S(   u   clear the current axisu    u   linearu	   axes.gridu   axes.grid.whichu   bothu   majoru   minorN(   u   bothu   major(   u   bothu   minor(   R1   Rp   R   R   R   R   R   t   _gridOnMajort   _gridOnMinort   reset_ticksR   t	   converterR   R   R\   R]   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   !  s    


		c         C` sk   y
 |  `  Wn t k
 r n Xy
 |  ` Wn t k
 r; n Xy |  j |  j j  Wn t k
 rf n Xd S(   us   
        Re-initialize the major and minor Tick lists.

        Each list starts with a single fresh Tick.
        N(   R   t   AttributeErrorR   R[   R   t   patch(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   8  s    

u   majorc         K` sc  g  } | d k s | d k r1 | j  |  j  n  | d k sI | d k r\ | j  |  j  n  |  j | d t } x. | D]& } | r | j   n  | j |  qx W| r |  j   n | d k s | d k r x$ |  j D] } | j	 |  j   q Wn  | d k s| d k r3x$ |  j
 D] } | j	 |  j   qWn  d | k rV|  j j | d  n  t |  _ d S(   u   
        Set appearance parameters for ticks, ticklabels, and gridlines.

        For documentation of keyword arguments, see
        :meth:`matplotlib.axes.Axes.tick_params`.
        u   majoru   bothu   minort
   to_init_kwu
   labelcolorN(   R   R   R   t   _translate_tick_kwR\   t   cleart   updateR   R   Rf   R   R   t	   set_colorR]   (   R:   R   t   resetRI   t   dictst   kwtranst   dR   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_tick_paramsL  s*    c   	      C` s  d d d d d d d d d	 d
 d d d g } d d d d d d d d d d d g } t  } | | | } t   } | rd |  k r |  j d  | d <n  d |  k r |  j d  | d <n  d |  k r |  j d  | d <n  d |  k rt |  j d   | d
 <n  d |  k r-t |  j d   | d
 <n  d |  k rUt |  j d   | d <n  d |  k r}t |  j d   | d <n  d |  k rt |  j d   | d <n  d |  k rt |  j d   | d <n  d |  k rt |  j d   | d <n  d |  k rt |  j d   | d <n  d |  k rO|  j d  } | | d <| | d <n  x3 |  D]+ } | | k rVt d | | f   qVqVW| j |   n t d   | S(   Nu   sizeu   widthu   coloru   tickdiru   padu	   labelsizeu
   labelcoloru   zorderu   gridOnu   tick1Onu   tick2Onu   label1Onu   label2Onu   lengthu	   directionu   leftu   bottomu   rightu   topu	   labelleftu   labelbottomu
   labelrightu   labeltopu   labelrotationu   rotationu   colorsu3   keyword %s is not recognized; valid keywords are %su   Inverse translation is deferred(   R   R   Rz   R   RP   R  Rv   (	   RI   R  t   kwkeys0t   kwkeys1t   kwkeys2t   kwkeysR
  t   ct   key(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  k  sX    		
c         C` sN   t  j j |  | |  x( |  j |  j D] } | j | |  q' Wt |  _ d  S(   N(   R   R   R[   R   R   R\   R]   (   R:   R^   R_   t   child(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR[     s    c         C` s   t  d   d S(   u6   return the Interval instance for this axis view limitsu   Derived must overrideN(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRw     s    c         C` s   t  d   d  S(   Nu   Derived must override(   Rv   (   R:   R   R   t   ignore(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_view_interval  s    c         C` s   t  d   d S(   u6   return the Interval instance for this axis data limitsu   Derived must overrideN(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_data_interval  s    c         C` s   t  d   d S(   u   set the axis data limitsu   Derived must overrideN(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_data_interval  s    c         C` s   d S(   uZ   set the default limits for the axis data and view interval if they
        are not mutatedN(    (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_default_intervals  s    c         C` s$   | d  k r d  S| j |  j  d  S(   N(   R   R   R   (   R:   Rt   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRu     s    c         c` s%  |  j  j   } |  j t |   } |  j  j j |  g  t |  D]! \ } } |  j  j | |  ^ qD } |  j j   } |  j t |   } |  j j j |  g  t |  D]! \ } } |  j j | |  ^ q } | | | f | | | f g }	 x* |	 D]" }
 x t	 |
   D] } | VqWq Wd S(   uC   
        Iterate through all of the major and minor ticks.
        N(
   RC   R   R   t   lenR   t   set_locst	   enumerateR   R   t   zip(   R:   t	   majorLocsR   t   iRg   t   majorLabelst	   minorLocsR   t   minorLabelst   major_minort   groupR   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt
   iter_ticks  s    11c         C` s   |  j  |  } |  j | |  \ } } t |  rH t j j |  } n t j j d d d d  } t |  r t j j |  } n t j j d d d d  } | | f S(   uX   
        Get the extents of the tick labels on either side
        of the axes.
        i    (   t   _update_tickst   _get_tick_bboxesR  t   mtransformst   Bboxt   uniont   from_extents(   R:   Ro   t   ticks_to_drawt   ticklabelBoxest   ticklabelBoxes2t   bboxt   bbox2(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_ticklabel_extents  s    	c         C` s   | |  _  t |  _ d S(   u!   set the axis to have smart boundsN(   R   R\   R]   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_smart_bounds  s    	c         C` s   |  j  S(   u%   get whether the axis has smart bounds(   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_smart_bounds  s    c         C` s  |  j    } t |  j    } |  j rI| rIt |  \ } } t |  j    \ } } t j g  | D] } | d ^ qd  }	 | | k r | }
 n3 |	 |	 | k } t |  r | d }
 n
 |	 d }
 | | k r | } n3 |	 |	 | k } t |  r| d } n
 |	 d } g  | D], } |
 | d k o5| k n r| ^ q} n  | d | d k rf| } n | d | d f } t	 |  d  r`t j
 d d   y |  j | d d  } Wn t j d  d	 } n Xt j |  rd	 } n  y |  j | d d
 
 } Wn t j d  d	 } n Xt j |  r;d	 } n  Wd QX| d | | d | f } n  g  } xu | D]m \ } } } | d k rqmn  | j |  | j |  | j |  t j | |  sqmn  | j |  qmW| S(   u   
        Update ticks (position and labels) using the current data
        interval of the axes. Returns a list of ticks that will be
        drawn.
        i   ii    u   _get_pixel_distance_along_axist   invalidu   ignoreg      ul   Unable to find pixel distance along axis for interval padding of ticks; assuming no interval padding needed.g        g      ?N(   Rw   RO   R$  R   t   sortedR  t   npt   sortR  t   hasattrt   errstatet   _get_pixel_distance_along_axist   warningst   warnt   isnanR   R9   Rr   Rs   R'  t   interval_containsR   (   R:   Ro   t   intervalt	   tick_tupst   view_lowt	   view_hight   data_lowt	   data_hight   tit   locst   ilowt	   good_locst   ihight   interval_expandedt   ds1t   ds2R+  R   R;   R1   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR%    sj    &	
	
<	
	
c         C` s   g  } g  } x | D]z } | j  rS | j j   rS | j j |  } | j |  n  | j r | j j   r | j j |  } | j |  q q W| | f S(   u   
        Given the list of ticks, return two lists of bboxes. One for
        tick lable1's and another for tick label2's.
        (   R7   R0   Rk   t   get_window_extentR   R8   R3   (   R:   t   ticksRo   R,  R-  R   t   extent(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR&  _  s    c   	      C` s-  |  j    s d S|  j |  } |  j |  |  j | |  \ } } |  j | |  |  j j |  j j j	    g  } x? |  j
 |  j g D]+ } | j    r | j | j |   q q W| j |  | j |  g  | D]* } | j d k s | j d k r | ^ q } | r%t j j |  } | Sd Sd S(   u   
        Return a bounding box that encloses the axis. It only accounts
        tick labels, axis label, and offsetText.
        Ni    (   Rk   R%  t   _update_label_positionR&  t   _update_offset_text_positionR   Rp   RC   R   t
   get_offsetR1   R   RL  R   R=   t   heightR'  R(  R)  R   (	   R:   Ro   R+  R,  R-  t   bbRt   t   bt   _bbox(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_tightbboxq  s&    7c         C` sx   g  } t  |  j  r2 | j |  j d j    n  t  |  j  r^ | j |  j d j    n  t  |  rt t |  Sd S(   Ni    g        (   R  R   R   RX   R   t   max(   R:   t   values(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRX     s    
c         O` s   |  j    s d S| j t  |  j |  } |  j | |  \ } } x | D] } | j |  qK W|  j |  |  j j |  |  j | |  |  j	 j
 |  j j j    |  j	 j |  | j t  t |  _ d S(   u6   Draw the axis lines, grid lines, tick lines and labelsN(   Rk   Rl   R   R%  R&  Rm   RO  R1   RP  R   Rp   RC   R   RQ  Rn   R   R]   (   R:   Ro   t   argsR   R+  R,  R-  R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRm     s    	c         C` s   t  d   d  S(   Nu   Derived must override(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s   t  d   d  S(   Nu   Derived must override(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    c         C` s2   |  j    } t j d g  | D] } | j ^ q  S(   u2   Return the grid lines as a list of Line2D instanceu   Line2D gridline(   R   R   t   silent_listR.   (   R:   RM  R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_gridlines  s    	c         C` s   |  j  S(   u(   Return the axis label as a Text instance(   R1   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt	   get_label  s    c         C` s   |  j  S(   u-   Return the axis offsetText as a Text instance(   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_offset_text  s    c         C` s   |  j  S(   u/   Return the depth of the axis used by the picker(   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_pickradius  s    c         C` sj   |  j    } g  | D] } | j r | j ^ q } g  | D] } | j r8 | j ^ q8 } t j d | |  S(   u8   Return a list of Text instances for the major ticklabelsu   Text major ticklabel(   R   R7   R0   R8   R3   R   RZ  (   R:   RM  R   t   labels1t   labels2(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_majorticklabels  s    %%c         C` sj   |  j    } g  | D] } | j r | j ^ q } g  | D] } | j r8 | j ^ q8 } t j d | |  S(   u8   Return a list of Text instances for the minor ticklabelsu   Text minor ticklabel(   R   R7   R0   R8   R3   R   RZ  (   R:   RM  R   R_  R`  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_minorticklabels  s    %%c         C` s   | d k	 rq | d k r" |  j   S| d k r8 |  j   S| d k rX |  j   |  j   St d t |    n  | r |  j   S|  j   S(   u  
        Get the tick labels as a list of :class:`~matplotlib.text.Text`
        instances.

        Parameters
        ----------
        minor : bool
           If True return the minor ticklabels,
           else return the major ticklabels

        which : None, ('minor', 'major', 'both')
           Overrides `minor`.

           Selects which ticklabels to return

        Returns
        -------
        ret : list
           List of :class:`~matplotlib.text.Text` instances.
        u   minoru   majoru   bothu6   `which` must be one of ('minor', 'major', 'both') not N(   R   Rb  Ra  RP   t   str(   R:   R   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_ticklabels  s    


c         C` sS   g  } |  j    } x. | D]& } | j | j  | j | j  q Wt j d |  S(   u9   Return the major tick lines as a list of Line2D instancesu   Line2D ticklines(   R   R   R*   R,   R   RZ  (   R:   t   linesRM  R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_majorticklines  s    c         C` sS   g  } |  j    } x. | D]& } | j | j  | j | j  q Wt j d |  S(   u9   Return the minor tick lines as a list of Line2D instancesu   Line2D ticklines(   R   R   R*   R,   R   RZ  (   R:   Re  RM  R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_minorticklines  s    c         C` s   | r |  j    S|  j   S(   u3   Return the tick lines as a list of Line2D instances(   Rg  Rf  (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_ticklines  s    
c         C` s   |  j  j   S(   uA   Get the major tick locations in data coordinates as a numpy array(   RC   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_majorticklocs%  s    c         C` s   |  j  j   S(   uA   Get the minor tick locations in data coordinates as a numpy array(   R   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_minorticklocs)  s    c         C` s    | r |  j  j   S|  j j   S(   u;   Get the tick locations in data coordinates as a numpy array(   R   R   RC   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_ticklocs-  s    c         C` s\   | r/ t  j g  |  j   D] } | j ^ q  St  j g  |  j   D] } | j ^ qB  Sd S(   uK  
        Get the tick directions as a numpy array

        Parameters
        ----------
        minor : boolean
            True to return the minor tick directions,
            False to return the major tick directions,
            Default is False

        Returns
        -------
        numpy array of tick directions
        N(   R5  t   arrayR   RU   R   (   R:   R   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_ticks_direction3  s
    #c         C` s   t  d   d S(   u    return the default tick instanceu   derived must overrideN(   Rv   (   R:   RC   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   I  s    c         C` s   | d k s | d k r d S| j j | j  | j j | j  | j j | j  | j j | j  | j j | j  | j | _ | j | _ | j	 | _	 | j
 | _
 d S(   u)   Copy the props from src tick to dest tickN(   R   R0   t   update_fromR3   R*   R,   R.   R5   R6   R7   R8   (   R:   t   srct   dest(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   _copy_tick_propsM  s    c         C` s   |  j  j   S(   u   Get the text of the label(   R1   t   get_text(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_label_text]  s    c         C` s
   |  j  j S(   u#   Get the locator of the major ticker(   RC   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_major_locatora  s    c         C` s
   |  j  j S(   u#   Get the locator of the minor ticker(   R   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_minor_locatore  s    c         C` s
   |  j  j S(   u%   Get the formatter of the major ticker(   RC   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_major_formatteri  s    c         C` s
   |  j  j S(   u%   Get the formatter of the minor ticker(   R   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_minor_formatterm  s    c         C` s   | d k r$ t |  j      } n  xg t |  j  | k  r |  j d t  } |  j j |  |  j rs t | _ n  |  j	 |  j d |  q' W|  j |  S(   u)   get the tick instances; grow as necessaryRC   i    N(
   R   R  Rt  R   R   R\   R   R   R4   Rq  (   R:   t   numticksR   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   q  s    	c         C` s   | d k r$ t |  j      } n  xg t |  j  | k  r |  j d t  } |  j j |  |  j rs t | _	 n  |  j
 |  j d |  q' W|  j |  S(   u/   get the minor tick instances; grow as necessaryRC   i    N(   R   R  Ru  R   R   R   R   R   R\   R4   Rq  (   R:   Rx  R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    	c         K` s   t  |  r t } n  | j   } d   | j   D } | d k r | d k r_ |  j |  _ n	 | |  _ |  j d d d |  j |  n  | d	 k r | d k r |  j |  _ n	 | |  _ |  j d d d |  j |  n  t |  _ d S(
   u  
        Set the axis grid on or off; b is a boolean. Use *which* =
        'major' | 'minor' | 'both' to set the grid for major or minor ticks.

        If *b* is *None* and len(kwargs)==0, toggle the grid state.  If
        *kwargs* are supplied, it is assumed you want the grid on and *b*
        will be set to True.

        *kwargs* are used to set the line properties of the grids, e.g.,

          xax.grid(color='r', linestyle='-', linewidth=2)
        c         S` s%   i  |  ] } | d  d | d  q S(   i   u   grid_i    (    (   R   t   item(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pys
   <dictcomp>  s   	 u   minoru   bothR   R4   u   majorN(   u   minoru   both(   u   majoru   both(	   R  R\   R   R&   R   R   R  R   R]   (   R:   RT  R   R   t   gridkw(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   grid  s"    		
	
c         C` s   t  j j |  } | d k r" t S|  j | k } | |  _ |  j j | |   } | d k	 rz |  j d k rz |  j |  n  | r |  j	   n  t
 |  _ t
 S(   u   
        introspect *data* for units converter and update the
        axis.converter instance if necessary. Return *True*
        if *data* is registered for unit conversion.
        N(   t   munitst   registryt   get_converterR   R   R   t   default_unitsR   R   t   _update_axisinfoR\   R]   (   R:   t   dataR   t   neednewt   default(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   update_units  s    		c         C` s  |  j  d k r d S|  j  j |  j |   } | d k r; d S| j d k	 r |  j j | j k r |  j r |  j | j  t	 |  _ n  | j
 d k	 r |  j j | j
 k r |  j r |  j | j
  t	 |  _ n  | j d k	 r|  j j | j k r|  j r|  j | j  t	 |  _ n  | j d k	 r_|  j j | j k r_|  j r_|  j | j  t	 |  _ n  | j d k	 r|  j r|  j | j  t	 |  _ n  |  j   d S(   us   
        check the axis converter for the stored units to see if the
        axis info needs to be updated
        N(   R   R   t   axisinfoR   t   majlocRC   R   R   t   set_major_locatorR\   t   minlocR   R   t   set_minor_locatort   majfmtR   R   t   set_major_formattert   minfmtR   t   set_minor_formatterR1   R   t   set_label_textR  (   R:   t   info(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s2    c         C` s   |  j  d  k	 p |  j d  k	 S(   N(   R   R   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt
   have_units  s    c         C` so   t  j j |  r | S|  j d  k r= t  j j |  |  _ n  |  j d  k rP | S|  j j | |  j |   } | S(   N(	   R|  t   ConversionInterfacet
   is_numlikeR   R   R}  R~  t   convertR   (   R:   R   t   ret(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   convert_units  s    c         C` s   t  } | d k r$ d |  _ t } n! | |  j k rE | |  _ t } n  | rx |  j   |  j j d  |  j j d  n  t |  _ d S(   uF   
        set the units for axis

        ACCEPTS: a units tag
        u   unitsu   units finalizeN(   R   R   R   R\   R  R   t   processR]   (   R:   t   ut   pchanged(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    				
c         C` s   |  j  S(   u   return the units for axis(   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt	   get_units  s    c         K` sX   t  |  _ |  j j |  | d k	 r8 |  j j |  n  |  j j |  t |  _ |  j S(   u_     Sets the text value of the axis label

        ACCEPTS: A string value for the label
        N(   R   R   R1   Rp   R   R  R\   R]   (   R:   R1   t   fontdictR   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s    		c         C` s/   t  |  _ | |  j _ | j |   t |  _ d S(   uz   
        Set the formatter of the major ticker

        ACCEPTS: A :class:`~matplotlib.ticker.Formatter` instance
        N(   R   R   RC   R   t   set_axisR\   R]   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s    	c         C` s/   t  |  _ | |  j _ | j |   t |  _ d S(   uz   
        Set the formatter of the minor ticker

        ACCEPTS: A :class:`~matplotlib.ticker.Formatter` instance
        N(   R   R   R   R   R  R\   R]   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  )  s    	c         C` s/   t  |  _ | |  j _ | j |   t |  _ d S(   uv   
        Set the locator of the major ticker

        ACCEPTS: a :class:`~matplotlib.ticker.Locator` instance
        N(   R   R   RC   R   R  R\   R]   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  4  s    	c         C` s/   t  |  _ | |  j _ | j |   t |  _ d S(   uv   
        Set the locator of the minor ticker

        ACCEPTS: a :class:`~matplotlib.ticker.Locator` instance
        N(   R   R   R   R   R  R\   R]   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  ?  s    	c         C` s   | |  _  d S(   ue   
        Set the depth of the axis used by the picker

        ACCEPTS: a distance in points
        N(   R   (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_pickradiusJ  s    c         O` s_  g  } xF | D]> } y | j  | j    Wq t k
 rJ | j  |  q Xq W| } | j d t  } | r |  j t j |   |  j   } n" |  j	 t j |   |  j
   } g  } x t | |  D] \ }	 }
 |
 j j |	  |
 j j |  |
 j j |	  |
 j j |  |
 j r2| j  |
 j  n  |
 j r | j  |
 j  q q Wt |  _ | S(   u  
        Set the text values of the tick labels. Return a list of Text
        instances.  Use *kwarg* *minor=True* to select minor ticks.
        All other kwargs are used to update the text object properties.
        As for get_ticklabels, label1 (left or bottom) is
        affected for a given tick only if its label1On attribute
        is True, and similarly for label2.  The list of returned
        label text objects consists of all such label1 objects followed
        by all such label2 objects.

        The input *ticklabels* is assumed to match the set of
        tick locations, regardless of the state of label1On and
        label2On.

        ACCEPTS: sequence of strings or Text objects
        u   minor(   R   Rr  R  Rz   R   R  t   mtickert   FixedFormatterR   R  R   R  R0   Rp   R  R3   R7   R8   R\   R]   (   R:   t
   ticklabelsRY  R   t
   get_labelsR   R   RM  R  t
   tick_labelR   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_ticklabelsR  s2    			c         C` s   |  j  |  } t |  d k r} |  j   \ } } | | k r^ |  j t |  t |   q} |  j t |  t |   n  | r |  j t j |   |  j	 t |   S|  j
 t j |   |  j t |   Sd S(   un   
        Set the locations of the tick marks from sequence ticks

        ACCEPTS: sequence of floats
        i   N(   R  R  Rw   R  t   minRW  R  R  t   FixedLocatorR   R  R   (   R:   RM  R   t   xleftt   xright(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt	   set_ticks  s    c         C` s   t  d   d S(   u   
        Get the bounding boxes for this `.axis` and its siblings
        as set by `.Figure.align_xlabels` or  `.Figure.align_ylablels`.

        By default it just gets bboxes for self.
        u   Derived must overrideN(   Rv   (   R:   t   xdirRo   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   _get_tick_boxes_siblings  s    c         C` s   t  d   d S(   uy   
        Update the label position based on the bounding box enclosing
        all the ticklabels and axis spine
        u   Derived must overrideN(   Rv   (   R:   Ro   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRO    s    c         C` s   t  d   d S(   uq   
        Update the label position based on the sequence of bounding
        boxes of all the ticklabels
        u   Derived must overrideN(   Rv   (   R:   t   bboxest   bboxes2(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRP    s    c         C` s   |  j  j j |  d S(   u,   Pan *numsteps* (can be positive or negative)N(   RC   R   t   pan(   R:   t   numsteps(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s    c         C` s   |  j  j j |  d S(   u@   Zoom in/out on axis; if *direction* is >0 zoom in, else zoom outN(   RC   R   t   zoom(   R:   t	   direction(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s    c      
   C` sk   d d l  } t | t j  r< d d l } | j |  } n  |  j | j  d d d d d d d |   d S(   u   
        Sets up x-axis ticks and labels that treat the x data as dates.
        *tz* is a :class:`tzinfo` instance or a timezone string.
        This timezone is used to create date labels.
        i    Ni  i   (   t   datetimeRK   RL   RM   t   pytzt   timezoneR  (   R:   t   tzR  R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt	   axis_date  s
    
c         C` s   t     d S(   uP   
        Return the estimated number of ticks that can fit on the axis.
        N(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_tick_space  s    c         C` s   |  j  S(   u;   
        Return the label position (top or bottom)
        (   t   label_position(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_label_position  s    c         C` s   t     d S(   u_   
        Set the label position (top or bottom)

        ACCEPTS: [ 'top' | 'bottom' ]
        N(   Rv   (   R:   t   position(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_label_position  s    c         C` s   t     d  S(   N(   Rv   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    N(_   R   R   R   t   OFFSETTEXTPADR   R   R   R\   R   R   R   R   R   R   R   R   R   t   propertyR   t
   deprecatedR   t   setterRZ   R   R   R  t   staticmethodR  R[   Rw   R  R  R  R  Ru   R$  R0  R1  R2  R%  R&  RV  RX   R   Rm   R   R   R[  R\  R]  R^  Ra  Rb  Rd  Rf  Rg  Rh  Ri  Rj  Rk  Rm  R   Rq  Rs  Rt  Ru  Rv  Rw  R   R   R{  R  R  R  R  R   R  R  R  R  R  R  R  R  R  R  RO  RP  R  R  R  R  R  R  R   (    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s   	!									3										c		#	
%								$													!		"										5									t   XAxisc           B` s   e  Z d  Z  d Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d	   Z
 d
   Z d   Z d   Z d   Z d   Z d   Z d   Z e d  Z d   Z d   Z e d  Z d   Z d   Z RS(   u   xaxisu   xc         C` s  t  |  j  r |  j |  |  S| j | j } } y1 |  j j j   } | j | | f  \ } } Wn t k
 r} t	 i  f SX|  j j j d  \ } } |  j j j d  \ }	 }
 | d k o| d k o| | k  r | | |  j
 k p| |
 k o| |
 |  j
 k  } | i  f S(   u=   Test whether the mouse event occurred in the x axis.
        i    i   (   i    i    (   i   i   (   Rb   Rc   R   R   R   R   t   invertedR   RP   R   R   (   R:   Rd   R   R   R   t   xaxest   yaxesR   RT  t   rR   t   inaxis(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRe     s    c         C` s7   | r |  j  } n	 |  j } t |  j d d d | | S(   Ni    u    RC   (   R   R   R   R   (   R:   RC   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    	c         C` s   t  j d d d d d t j d t d d t d	  d
 t d d d d d  } | j t j |  j j	 t j
     |  j |  d |  _ | S(   NR   g      ?R   i    R   R<   u   axes.labelsizet   weightu   axes.labelweightR>   u   axes.labelcolorR   u   topR   u   centeru   bottom(   R   R   R   R   R   R   R'  t   blended_transform_factoryR   R   t   IdentityTransformRu   R  (   R:   R1   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    	

		c         C` s   t  j d d d d d t j d t d  d t d	 d
 d d d  } | j t j |  j j	 t j
     |  j |  d |  _ | S(   NR   i   R   i    R   R<   u   xtick.labelsizeR>   u   xtick.colorR   u   topR   u   rightu   bottom(   R   R   R   R   R   R   R'  R  R   R   R  Ru   t   offset_text_position(   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    	
		c         C` s|   |  j  j d k r d S|  j  j } | j   } | j | d f  } | j | d | | d f  } t | d |  } | S(   u  
        Returns the amount, in data coordinates, that a single pixel
        corresponds to in the locality given by "where", which is also given
        in data coordinates, and is an x coordinate. "perturb" is the amount
        to perturb the pixel.  Usually +0.5 or -0.5.

        Implementing this routine for an axis is optional; if present, it will
        ensure that no ticks are lost due to round-off at the extreme ends of
        an axis.
        u   polarg        g|=i    i   (   R   RJ   t	   transDataR  R   t   abs(   R:   t   wheret   perturbR   t   transinvt   pixt   ptpt   dx(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR9  #  s    !c         C` s`   | d k r |  j  j d  n+ | d k r> |  j  j d  n t d   | |  _ t |  _ d S(   u_   
        Set the label position (top or bottom)

        ACCEPTS: [ 'top' | 'bottom' ]
        u   topu   baselineu   bottomu'   Position accepts only 'top' or 'bottom'N(   R1   t   set_verticalalignmentRP   R  R\   R]   (   R:   R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  F  s    	c   
      C` s   g  } g  } |  j  j } xm t | j |  j   D]S \ } } | j j |  } | j j | |  \ } }	 | j |  | j |	  q1 W| | f S(   u   
        Get the bounding boxes for this `.axis` and its siblings
        as set by `.Figure.align_xlabels` or  `.Figure.align_ylablels`.

        By default it just gets bboxes for self.
        (	   R   t   _align_xlabel_grpR  t   get_siblingsR   t   xaxisR%  R&  R   (
   R:   Ro   R  R  t   grpt   nnt   axxR+  t   tlbt   tlb2(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  U  s    %c         C` s  |  j  s d S|  j d |  \ } } |  j j   \ } } |  j d k r y5 |  j j d } | j   j | j	    j
   } Wn t k
 r |  j j } n Xt j j | | g  } | j }	 |  j j | |	 |  j |  j j d f  n y5 |  j j d } | j   j | j	    j
   } Wn t k
 rB|  j j } n Xt j j | | g  } | j }
 |  j j | |
 |  j |  j j d f  d S(   uy   
        Update the label position based on the bounding box enclosing
        all the ticklabels and axis spine
        NRo   u   bottomg      R@u   top(   R   R  R1   t   get_positionR  R   t   spinesR   t   transform_pathR   t   get_extentst   KeyErrorR.  R'  R(  R)  t   y0R   R   R   R`   t   y1(   R:   Ro   R  R  R   R   t   spinet	   spinebboxR.  t   bottomt   top(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRO  h  s2    			%		c         C` s}   |  j  j   \ } } t |  s3 |  j j j } n t j j |  } | j	 } |  j  j
 | | |  j |  j j d f  d S(   uw   
        Update the offset_text position based on the sequence of bounding
        boxes of all the ticklabels
        g      R@N(   R   R  R  R   R.  t   yminR'  R(  R)  R  R   R  R   R`   (   R:   R  R  R   R   R  R.  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRP    s    		c         C` s   |  j  |  \ } } |  j d j   } d } | j rK | | j | 7} n  d } | j rn | | j | 7} n  |  j   d k r | |  j j |  j | 7} n | |  j j |  j | 7} | | f S(   u   
        Returns the amount of space one should reserve for text
        above and below the axes.  Returns a tuple (above, below)
        i    g        u   top(   R0  R   Ra   RR  R  R1   RL  (   R:   Ro   R.  R/  t	   padPixelst   abovet   below(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_text_heights  s    		 c         C` s  | d k r7 |  j  d d d t d t d t d t  n | d k rn |  j  d d d t d t d t d t  n | d k r |  j  d d d t d t  nr | d	 k r |  j  d d d t d t  nG | d
 k r |  j  d d d t d t d t d t  n t d |   t |  _ d S(   u  
        Set the ticks position (top, bottom, both, default or none)
        both sets the ticks to appear on both positions, but does not
        change the tick labels.  'default' resets the tick positions to
        the default: ticks on both positions, labels at bottom.  'none'
        can be used if you don't want any ticks. 'none' and 'both'
        affect only the ticks, not the labels.

        ACCEPTS: [ 'top' | 'bottom' | 'both' | 'default' | 'none' ]
        u   topR   u   bothR  t   labeltopR  t   labelbottomu   bottomu   noneu   defaultu   invalid position: %sN(   R  R\   R   RP   R]   (   R:   R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_ticks_position  s"    

c         C` sY   t  } d |  j k r2 |  j d p, |  j d } n  |  j d  |  j d d d |  d S(   uP   
        Move ticks and ticklabels (if present) to the top of the axes.
        u   label1Onu   label2Onu   topR   u   bothR  N(   R\   R   R  R  (   R:   R1   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   tick_top  s    c         C` sY   t  } d |  j k r2 |  j d p, |  j d } n  |  j d  |  j d d d |  d S(   uS   
        Move ticks and ticklabels (if present) to the bottom of the axes.
        u   label1Onu   label2Onu   bottomR   u   bothR  N(   R\   R   R  R  (   R:   R1   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   tick_bottom  s    c   	      C` s0  |  j  d } |  j d } | j o= | j o= | j o= | j } | j oc | j oc | j oc | j } | rv | rv d S| j o | j o | j o | j } | j o | j o | j o | j } | r | r d S| j o | j o | j o | j } | j o| j o| j o| j } | r,| r,d Sd S(   uM   
        Return the ticks position (top, bottom, default or unknown)
        i    u   topu   bottomu   defaultu   unknown(   R   R   R5   R6   R7   R8   (	   R:   t   majtt   mTt   majorTopt   minorTopt   MajorBottomt   MinorBottomt   majorDefaultt   minorDefault(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_ticks_position  s*    c         C` s   |  j  j j S(   u6   return the Interval instance for this axis view limits(   R   R   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRw     s    c         C` s   | r | | f |  j  j _ n{ |  j   \ } } | | k  rl t | | |  t | | |  f |  j  j _ n- t | | |  t | | |  f |  j  j _ d S(   uU  
        If *ignore* is *False*, the order of vmin, vmax
        does not matter; the original axis orientation will
        be preserved. In addition, the view limits can be
        expanded, but will not be reduced.  This method is
        for mpl internal use; for normal use, see
        :meth:`~matplotlib.axes.Axes.set_xlim`.

        N(   R   R   R   Rw   R  RW  (   R:   R   R   R  t   Vmint   Vmax(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s    
!c         C` s   |  j  j j S(   N(   R   t   dataLimt   minposx(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   '  s    c         C` s   |  j  j j S(   u6   return the Interval instance for this axis data limits(   R   R  R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  *  s    c         C` sd   | r | | f |  j  j _ n9 |  j   \ } } t | |  t | |  f |  j  j _ t |  _ d S(   u   set the axis data limitsN(   R   R  R   R  R  RW  R\   R]   (   R:   R   R   R  R  R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  .  s
    'c         C` s  d \ } } |  j  j j   } |  j  j j   } | s> | r |  j d k	 r |  j j |  j |   } | j d k	 r | j \ } } |  j j	 | |  j |   } |  j j	 | |  j |   } q n  | s | | f |  j  j _
 n  | s | | f |  j  j _
 q n  t |  _ d S(   uD   set the default limits for the axis interval if they are not mutatedg        g      ?N(   g        g      ?(   R   R  t   mutatedxR   R   R   R  R   t   default_limitsR  R   R\   R]   (   R:   t   xmint   xmaxt   dataMutatedt   viewMutatedR  t   valmint   valmax(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  7  s    !c         C` s   |  j  j j d d g d d g g  } | d d | d d |  j  j j d } |  j t  } | j j   d } | d k r t	 t
 j | |   Sd Sd  S(	   Ni    i   g      R@i   i   i   I       i(   R   R   R_   R   R`   R   R\   R0   t   get_sizet   intR5  t   floor(   R:   t   endst   lengthR   R<   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  I  s    '+(   R   R   t	   axis_nameRe   R   R   R   R9  R  R  RO  RP  R  R  R  R  R  Rw   R   R  R   R  R  R  R  (    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s.   					#			+											t   YAxisc           B` s   e  Z d  Z  d Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d	   Z
 d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z e d  Z d   Z d   Z e d  Z d   Z d   Z RS(   u   yaxisu   yc         C` s  t  |  j  r |  j |  |  S| j | j } } y1 |  j j j   } | j | | f  \ } } Wn t k
 r} t	 i  f SX|  j j j d  \ } } |  j j j d  \ }	 }
 | d k o| d k o| | k  r | | |  j
 k p| |	 k o| |	 |  j
 k  } | i  f S(   u_   Test whether the mouse event occurred in the y axis.

        Returns *True* | *False*
        i    i   (   i    i    (   i   i   (   Rb   Rc   R   R   R   R   R  R   RP   R   R   (   R:   Rd   R   R   R   R  R  R   RT  R  R   R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRe   Z  s    c         C` s7   | r |  j  } n	 |  j } t |  j d d d | | S(   Ni    u    RC   (   R   R   R   R   (   R:   RC   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   o  s    	c         C` s   t  j d d d d d t j d t d d t d	  d
 t d d d d d d d d d  } | j t j t j   |  j	 j
   |  j |  d |  _ | S(   NR   i    R   g      ?R   R<   u   axes.labelsizeR  u   axes.labelweightR>   u   axes.labelcolorR   u   bottomR   u   centerRx   u   verticalt   rotation_modeu   anchoru   left(   R   R   R   R   R   R   R'  R  R  R   R   Ru   R  (   R:   R1   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   v  s    	

		c         C` s   t  j d d d d d t j d t d  d t d	 d
 d d d  } | j t j |  j j	 t j
     |  j |  d |  _ | S(   NR   i    R   g      ?R   R<   u   ytick.labelsizeR>   u   ytick.colorR   u   baselineR   u   left(   R   R   R   R   R   R   R'  R  R   R   R  Ru   R  (   R:   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR     s    	
		c         C` sf   |  j  j } | j   } | j d | f  } | j | d | d | f  } t | d |  } | S(   u  
        Returns the amount, in data coordinates, that a single pixel
        corresponds to in the locality given by *where*, which is also given
        in data coordinates, and is a y coordinate.

        *perturb* is the amount to perturb the pixel.  Usually +0.5 or -0.5.

        Implementing this routine for an axis is optional; if present, it will
        ensure that no ticks are lost due to round-off at the extreme ends of
        an axis.
        g|=i    i   (   R   R  R  R   R  (   R:   R  R  R   R  R  R  t   dy(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR9    s    !c         C` s   |  j  j d  |  j  j d  | d k r? |  j  j d  n+ | d k r^ |  j  j d  n t d   | |  _ t |  _ d S(	   u_   
        Set the label position (left or right)

        ACCEPTS: [ 'left' | 'right' ]
        u   anchoru   centeru   leftu   bottomu   rightu   topu'   Position accepts only 'left' or 'right'N(   R1   t   set_rotation_modet   set_horizontalalignmentR  RP   R  R\   R]   (   R:   R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s    	c   	      C` s   g  } g  } |  j  j } xa | j |  j  D]M } | j j |  } | j j | |  \ } } | j |  | j |  q+ W| | f S(   u   
        Get the bounding boxes for this `.axis` and its siblings
        as set by `.Figure.align_xlabels` or  `.Figure.align_ylablels`.

        By default it just gets bboxes for self.
        (   R   t   _align_ylabel_grpR  R   t   yaxisR%  R&  R   (	   R:   Ro   R  R  R  R  R+  R  R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR    s    c         C` s  |  j  s d S|  j d |  \ } } |  j j   \ } } |  j d k r y5 |  j j d } | j   j | j	    j
   } Wn t k
 r |  j j } n Xt j j | | g  } | j }	 |  j j |	 |  j |  j j d | f  n y5 |  j j d } | j   j | j	    j
   } Wn t k
 rB|  j j } n Xt j j | | g  } | j }
 |  j j |
 |  j |  j j d | f  d S(   uy   
        Update the label position based on the bounding box enclosing
        all the ticklabels and axis spine
        NRo   u   leftg      R@u   right(   R   R  R1   R  R  R   R  R   R  R   R  R  R.  R'  R(  R)  t   x0R   R   R   R`   t   x1(   R:   Ro   R  R  R   R   R  R  R.  t   leftt   right(    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRO    s2    			%		c         C` sS   |  j  j   \ } } |  j j j } |  j  j | | |  j |  j j d f  d S(   uw   
        Update the offset_text position based on the sequence of bounding
        boxes of all the ticklabels
        g      R@N(	   R   R  R   R.  t   ymaxR   R  R   R`   (   R:   R  R  R   R   R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRP  	  s    	c         C` s~   |  j  j   \ } } | d k r* d } n! | d k r? d } n t d   |  j  j |  |  j  j | | f  t |  _ d S(   u2   
        .. ACCEPTS: [ 'left' | 'right' ]
        u   lefti    u   righti   u*   Position accepts only [ 'left' | 'right' ]N(   R   R  RP   t   set_haR   R\   R]   (   R:   R  R   R   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   set_offset_position	  s    		c         C` s   |  j  |  \ } } |  j d j   } d } | j rK | | j | 7} n  d } | j rn | | j | 7} n  |  j   d k r | |  j j |  j | 7} n | |  j j |  j | 7} | | f S(   Ni    g        u   left(   R0  R   Ra   R=   R  R1   RL  (   R:   Ro   R.  R/  R  R  R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   get_text_widths	  s    		 c         C` s2  | d k rD |  j  d d d t d t d t d t  |  j |  n | d k r |  j  d d d t d t d t d t  |  j |  n | d k r |  j  d d d t d t  nr | d	 k r |  j  d d d t d t  nG | d
 k r|  j  d d d t d t d t d t  n t d |   t |  _ d S(   u  
        Set the ticks position (left, right, both, default or none)
        'both' sets the ticks to appear on both positions, but does not
        change the tick labels.  'default' resets the tick positions to
        the default: ticks on both positions, labels at left.  'none'
        can be used if you don't want any ticks. 'none' and 'both'
        affect only the ticks, not the labels.

        ACCEPTS: [ 'left' | 'right' | 'both' | 'default' | 'none' ]
        u   rightR   u   bothR  t
   labelrightR  t	   labelleftu   leftu   noneu   defaultu   invalid position: %sN(   R  R\   R   R  RP   R]   (   R:   R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  0	  s&    

c         C` sY   t  } d |  j k r2 |  j d p, |  j d } n  |  j d  |  j d d d |  d S(   uR   
        Move ticks and ticklabels (if present) to the right of the axes.
        u   label1Onu   label2Onu   rightR   u   bothR  N(   R\   R   R  R  (   R:   R1   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt
   tick_rightP	  s    c         C` sY   t  } d |  j k r2 |  j d p, |  j d } n  |  j d  |  j d d d |  d S(   uQ   
        Move ticks and ticklabels (if present) to the left of the axes.
        u   label1Onu   label2Onu   leftR   u   bothR  N(   R\   R   R  R  (   R:   R1   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt	   tick_left]	  s    c   	      C` s0  |  j  d } |  j d } | j o= | j o= | j o= | j } | j oc | j oc | j oc | j } | rv | rv d S| j o | j o | j o | j } | j o | j o | j o | j } | r | r d S| j o | j o | j o | j } | j o| j o| j o| j } | r,| r,d Sd S(   uJ   
        Return the ticks position (left, right, both or unknown)
        i    u   rightu   leftu   defaultu   unknown(   R   R   R5   R6   R7   R8   (	   R:   R  R  t
   majorRightt
   minorRightt	   majorLeftt	   minorLeftR  R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  j	  s*    c         C` s   |  j  j j S(   u6   return the Interval instance for this axis view limits(   R   R   R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyRw   	  s    c         C` s   | r | | f |  j  j _ n{ |  j   \ } } | | k  rl t | | |  t | | |  f |  j  j _ n- t | | |  t | | |  f |  j  j _ t |  _ d S(   uU  
        If *ignore* is *False*, the order of vmin, vmax
        does not matter; the original axis orientation will
        be preserved. In addition, the view limits can be
        expanded, but will not be reduced.  This method is
        for mpl internal use; for normal use, see
        :meth:`~matplotlib.axes.Axes.set_ylim`.

        N(   R   R   R   Rw   R  RW  R\   R]   (   R:   R   R   R  R  R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  	  s    
!c         C` s   |  j  j j S(   N(   R   R  t   minposy(   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR   	  s    c         C` s   |  j  j j S(   u6   return the Interval instance for this axis data limits(   R   R  R   (   R:   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  	  s    c         C` sd   | r | | f |  j  j _ n9 |  j   \ } } t | |  t | |  f |  j  j _ t |  _ d S(   u   set the axis data limitsN(   R   R  R   R  R  RW  R\   R]   (   R:   R   R   R  R  R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  	  s
    'c         C` s  d \ } } |  j  j j   } |  j  j j   } | s> | r |  j d k	 r |  j j |  j |   } | j d k	 r | j \ } } |  j j	 | |  j |   } |  j j	 | |  j |   } q n  | s | | f |  j  j _
 n  | s | | f |  j  j _
 q n  t |  _ d S(   uD   set the default limits for the axis interval if they are not mutatedg        g      ?N(   g        g      ?(   R   R  t   mutatedyR   R   R   R  R   R  R  R   R\   R]   (   R:   R  R  R   R  R  R  R  (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  	  s    !c         C` s   |  j  j j d d g d d g g  } | d d | d d |  j  j j d } |  j t  } | j j   d } | d k r t	 t
 j | |   Sd Sd  S(	   Ni    i   g      R@g       @i   i   I       i(   R   R   R_   R   R`   R   R\   R0   R  R  R5  R  (   R:   R  R  R   R<   (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR  	  s    '+(   R   R   R	  Re   R   R   R   R9  R  R  RO  RP  R  R  R  R  R  R  Rw   R   R  R   R  R  R  R  (    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyR
  V  s0   								*				 								(E   R   t
   __future__R    R   R   R   RL   t   loggingt
   matplotlibR   t   matplotlib.artistR   R   t   matplotlib.cbookR   R   t   matplotlib.font_managerR   t   matplotlib.linesRe  R   t   matplotlib.patchest   patchest   mpatchest   matplotlib.scalet   scaleR   t   matplotlib.textt   textR   t   matplotlib.tickert   tickerR  t   matplotlib.transformst
   transformsR'  t   matplotlib.unitsR   R|  t   numpyR5  R:  t	   getLoggerR   t   _logR   t   ArtistInspectorR   t   _line_AIt   get_setterst   _line_param_namest   aliasdRX  R  RO   t   keyst   _line_param_aliasesRJ   R   R   R   R   R   t   objectR   R   R   R  R
  (    (    (    s.   lib/python2.7/site-packages/matplotlib/axis.pyt   <module>   sN   "2 q{{     5 s