plt_transformer

PlasmaCalcs.plotting.plot_tools.plot_tricks.plt_transformer(xy=('data', 'data'), *, ax=None)

simple result useful for ‘transform’ kwarg for plotting functions.

xy: ‘data’, ‘axes’, or 2-tuple of (‘data’ or ‘axes’)
tells whether ‘x’ and ‘y’ should be in ‘data’ or ‘axes’ coordinates,
when using result of plt_transformer as ‘transform’ kwarg in plotting function.
single string –> both in this coordinate system.
tuple –> xy[0] tells x system; xy[1] tells y system.
‘data’ coords means input values match data values.
‘axes’ coords means input values correspond to distance across axis:
for x: left=0, right=1.
for y: bottom=0, top=1.
ax: None or matplotlib axes object
axes to use for the transformer. If None, use plt.gca() instead.