finesse.plotting.plot.rescale_axes_SI_units

finesse.plotting.plot.rescale_axes_SI_units(*, xaxis=None, fmt_xaxis='{:g}', yaxis=None, fmt_yaxis='{:g}', ax=None)[source]

Rescales either the x or y axes on a matplotlib axis object by some SI scale factor. This works by just changing the major tick labels rather than rescaling any data used so can be used after any plot has been made.

Parameters
xaxis, yaxisstr

An SI scaling character, see finesse.utilities.units.SI_LABEL

fmt_xaxis, fmt_yaxisstr

Python format string for setting the format of the ticks

Examples

Recsale a plot into units of milli on the xaxis and kilo on the y with 2 decimal places on x and 3 on y:

rescale_axes_SI_units(

xaxis=’m’, fmt_xaxis=”{:.2f}”, yaxis=’k’, fmt_yaxis=”{:.3f}”

)