PlasmaCalcs.plotting.plot_tools.plot_dims.infer_xyt_dims

PlasmaCalcs.plotting.plot_tools.plot_dims.infer_xyt_dims(dims, *, x=None, y=None, t=None, exclude=[], xy_fail_ok=False, t_fail_ok=True)
infer x, y, and t dims from dims, if not provided.
(if x, y, and t are provided, just return x,y,t, after ensuring x,y,t in dims)
dims: iterable of strings
all possible dims. Probably array.dims, if trying to infer from an array.
This function expects len(dims)==2 or 3, otherwise might behave strangely.
x: None or str
the dimension which will index the plot’s x axis.
y: None or str
the dimension which will index the plot’s y axis.
t: None or str
the dimension which will index the movie’s frames.
exclude: iterable
dims to exclude from dims, before inferring x,y,t.
xy_fail_ok, t_fail_ok: bool
controls behavior when failing to infer a dim:
True –> return None for that dim
False –> raise PlottingAmbiguityError
t_fail_ok corresponds to t; xy_fail_ok corresponds to x,y.
see also: infer_xy_dims, infer_movie_dim, DEFAULTS.PLOT.DIMS_INFER