sme_contrib.plot.facet_grid_animation3D
- sme_contrib.plot.facet_grid_animation3D(filename: str | Path, data: list[dict[str, ndarray]], plotfuncs: dict[str, Callable], show_cmap: bool = False, cmap: str | ndarray | LookupTable = 'viridis', portrait: bool = False, linked_views: bool = True, titles: list[dict[str, str]] | None = None, plotter_kwargs: dict | None = None, plotfuncs_kwargs: dict[str, dict[str, Any]] | None = None) str
Create a 3D animation from a series of data snapshots using PyVista.
This series must be a list of dictionaries with the data for each frame keyed by a label used to title the panel it will be plotted into. The final plot will have as many subplots as there are labels in the data dictionaries. The keys for plotfuncs and data must be the same.
- Parameters:
filename – (str) The name of the output movie file.
data – (list[dict[str, np.ndarray]]) A list of dictionaries containing the data for each timestep.
plotfuncs – (dict[str, Callable]) A dictionary of plotting functions keyed by data label. The keys for plotfuncs and data must be the same.
show_cmap – (bool), optional Whether to show the color map (default is False).
cmap – (str | np.ndarray | LookupTable, optional) The colormap to use (default is “viridis”).
portrait – (bool), optional Whether to use portrait layout (default is False).
linked_views – (bool), optional Whether to link the views of the subplots (default is True).
titles – (list[dict[str, str]]), optional A list of dictionaries containing titles for each subplot (default is an empty list).
plotter_kwargs – (dict), optional Additional keyword arguments to pass to the PyVista Plotter (default is an empty dictionary).
plotfuncs_kwargs – (dict[str, dict[str, Any]]), optional Additional keyword arguments to pass to each plotting function (default is an empty dictionary).
- Returns:
str The filename of the created movie.