PlasmaCalcs.plotting.scatter.xarray_scatter_where

PlasmaCalcs.plotting.scatter.xarray_scatter_where(arr, condition=None, *, x, y, t=None, **kw_scatter)
use XarrayScatter to plt.scatter() markers wherever arr==True.
Roughly equivalent: arr[y].where(arr).pc.scatter(x=x, t=t, **kw_scatter)
arr: xarray.DataArray
array of bools, or array to be provided to condition if condition is callable.
condition: None, array of bools, or callable
None –> use condition = arr, and arr must be array of bools.
array –> ignore arr entirely. condition must be array of bools.
callable –> use condition = condition(arr), which must return array of bools.
x: str
coordinate to use for x-axis values.
y: str
coordinate to use for y-axis values.
t: None or str
coordinate to use for “time” (iterate across movie frames).
None –> probably can’t animate; might show all points in 1 frame.
[TODO] optionally infer x, y, t automatically if not provided directly.
additional kwargs go to XarrayScatter
returns XarrayScatter object.