OwlCyberSecurity - MANAGER
Edit File: UnitDblFormatter.cpython-38.pyc
U ��]� � @ s, d Z ddlmZ dgZG dd� dej�ZdS )z:UnitDblFormatter module containing class UnitDblFormatter.� N�UnitDblFormatterc @ s2 e Zd ZdZdd� Zddd�Zdd� Zd d � ZdS )r zdThe formatter for UnitDbl data types. This allows for formatting with the unit string. c O s t jj| f|�|� dS )zAThe arguments are identical to matplotlib.ticker.ScalarFormatter.N)�ticker�ScalarFormatter�__init__)�self�args�kwargs� r �O/usr/lib/python3/dist-packages/matplotlib/testing/jpl_units/UnitDblFormatter.pyr s zUnitDblFormatter.__init__Nc C s t | j�dkrdS d�|�S dS )z0Return the format for tick val x at position posr � �{:.12}N)�lenZlocs�format)r �x�posr r r �__call__ s zUnitDblFormatter.__call__c C s d� |�S )z-Return the value formatted in 'short' format.r �r �r �valuer r r �format_data_short s z"UnitDblFormatter.format_data_shortc C s d� |�S )z)Return the value formatted into a string.r r r r r r �format_data s zUnitDblFormatter.format_data)N)�__name__� __module__�__qualname__�__doc__r r r r r r r r r s )r Zmatplotlib.tickerr �__all__r r r r r r �<module> s