ó
 m[c           @` si   d  Z  d d l m Z m Z m Z m Z d d l Z d d l j Z d g Z	 d e j
 f d „  ƒ  YZ d S(   u:   UnitDblFormatter module containing class UnitDblFormatter.i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNu   UnitDblFormattert   UnitDblFormatterc           B` s5   e  Z d  Z d „  Z d d „ Z d „  Z d „  Z RS(   ua   The formatter for UnitDbl data types.  This allows for formatting
      with the unit string.
   c         O` s   t  j j |  | | Ž d S(   uA   The arguments are identical to matplotlib.ticker.ScalarFormatter.N(   t   tickert   ScalarFormattert   __init__(   t   selft   argst   kwargs(    (    sL   lib/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.pyR      s    c         C` s*   t  |  j ƒ d k r d Sd j | ƒ Sd S(   u0   Return the format for tick val x at position posi    u    u   {:.12}N(   t   lent   locst   format(   R   t   xt   pos(    (    sL   lib/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.pyt   __call__"   s    c         C` s   d j  | ƒ S(   u-   Return the value formatted in 'short' format.u   {:.12}(   R   (   R   t   value(    (    sL   lib/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.pyt   format_data_short)   s    c         C` s   d j  | ƒ S(   u)   Return the value formatted into a string.u   {:.12}(   R   (   R   R   (    (    sL   lib/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.pyt   format_data-   s    N(   t   __name__t
   __module__t   __doc__R   t   NoneR   R   R   (    (    (    sL   lib/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.pyR      s
   		(   R   t
   __future__R    R   R   R   t   sixt   matplotlib.tickerR   t   __all__R   R   (    (    (    sL   lib/python2.7/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.pyt   <module>   s
   "	