sdf_xarray.plotting.animate#
- sdf_xarray.plotting.animate(data, fps=10, min_percentile=0, max_percentile=100, title=None, display_sdf_name=False, move_window=False, t=None, ax=None, **kwargs)[source]#
Generate an animation using an
xarray.DataArray. The intended use of this function is viasdf_xarray.dataarray_accessor.EpochAccessor.animate.- Parameters:
data (
DataArray) – DataArray containing the target datafps (
float) – Frames per second for the animationmin_percentile (
float) – Minimum percentile of the datamax_percentile (
float) – Maximum percentile of the datadisplay_sdf_name (
bool) – Display the sdf file name in the animation titlemove_window (
bool) – Update thexlimto be only values that are not NaNs at each time intervalt (
str|None) – Coordinate for t axis (the coordinate which will be animated over). IfNone, usedata.dims[0]kwargs – Keyword arguments to be passed to matplotlib
- Return type:
Examples
>>> anim = ds["Derived_Number_Density_Electron"].epoch.animate() >>> anim.save("animation.gif")