to_plot_axis

ompy.to_plot_axis(axis)[source]

Maps axis to 0, 1 or 2 according to which axis is specified

Parameters

axis (Union[int, str]) – Can be either of (0, ‘Eg’, ‘x’), (1, ‘Ex’, ‘y’), or (2, ‘both’, ‘egex’, ‘exeg’, ‘xy’, ‘yx’)

Return type

int

Returns

An int describing the axis in the basis of the plot, _not_ the values’ dimension.

Raises

ValueError if the axis is not supported