Download lib/python3.12/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.py from parallel-reasoner/env-full: direct link, hf CLI and curl.
- Browser
- Download file 657 Bytes
-
https://huggingface.co/parallel-reasoner/env-full/resolve/a2585bd5ca1cf640fa361bd20177ded829caaa8d/lib/python3.12/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.py
- Command line
-
hf download hf://parallel-reasoner/env-full@a2585bd5ca1cf640fa361bd20177ded829caaa8d/lib/python3.12/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.py
-
curl -L -o UnitDblFormatter.py https://huggingface.co/parallel-reasoner/env-full/resolve/a2585bd5ca1cf640fa361bd20177ded829caaa8d/lib/python3.12/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.py
657 Bytes
| """UnitDblFormatter module containing class UnitDblFormatter.""" | |
| import matplotlib.ticker as ticker | |
| __all__ = ['UnitDblFormatter'] | |
| class UnitDblFormatter(ticker.ScalarFormatter): | |
| """ | |
| The formatter for UnitDbl data types. | |
| This allows for formatting with the unit string. | |
| """ | |
| def __call__(self, x, pos=None): | |
| # docstring inherited | |
| if len(self.locs) == 0: | |
| return '' | |
| else: | |
| return f'{x:.12}' | |
| def format_data_short(self, value): | |
| # docstring inherited | |
| return f'{value:.12}' | |
| def format_data(self, value): | |
| # docstring inherited | |
| return f'{value:.12}' | |