lair.plotter.log10formatter#
- lair.plotter.log10formatter(x, pos, deci=0)[source]#
Format ticks to log 10 format with deci number of decimals.
- Parameters:
- Returns:
str – Formatted tick label.
- Return type:
Examples
>>> from functools import partial >>> import numpy as np >>> data: xr.DataArray # some data, in this case, 3D (time, lat, lon) >>> np.log10(data).plot(cbar_kwargs={"format": partial(log10formatter, deci=2)})