U
    ƒi2e©  ã                   @   s,   d Z ddlmZ dgZG dd„ dejƒZdS )z:UnitDblFormatter module containing class UnitDblFormatter.é    NÚUnitDblFormatterc                   @   s*   e Zd ZdZd	dd„Zdd„ Zdd„ ZdS )
r   ze
    The formatter for UnitDbl data types.

    This allows for formatting with the unit string.
    Nc                 C   s    t | jƒdkrdS d |¡S d S )Nr   Ú ú{:.12})ÚlenZlocsÚformat)ÚselfÚxÚpos© r
   úQ/tmp/pip-unpacked-wheel-qhyxngld/matplotlib/testing/jpl_units/UnitDblFormatter.pyÚ__call__   s    zUnitDblFormatter.__call__c                 C   s
   d  |¡S ©Nr   ©r   ©r   Úvaluer
   r
   r   Úformat_data_short   s    z"UnitDblFormatter.format_data_shortc                 C   s
   d  |¡S r   r   r   r
   r
   r   Úformat_data   s    zUnitDblFormatter.format_data)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r
   r
   r
   r   r      s   
)r   Zmatplotlib.tickerZtickerÚ__all__ZScalarFormatterr   r
   r
   r
   r   Ú<module>   s   