sme_contrib.plot.concentration_heatmap_animation3D

sme_contrib.plot.concentration_heatmap_animation3D(filename: str | Path, simulation_results: SimulationResultList, species: list[str], show_cmap: bool = False, cmap: str | ndarray | LookupTable = 'viridis', portrait: bool = False, titles: list[dict[str, str]] | None = None, linked_views: bool = True, plotter_kwargs: None | dict[str, Any] = None, plotfunc_kwargs: None | dict[str, dict[str, Any]] = None) str | Path

Animate a list of frames from a simulation result list. This function creates a 3D animation of the species concentrations over time. Each frame will be a 3D plot of the concentration of a single species. This function is a wrapper around the facet_grid_animation3D function. The animation will be saved to the specified filename.

Parameters:
  • filename (Union[str, Path]) – filename to save the animation to. Uses mp4 format.

  • simulation_results (sme.SimulationResultList) – a list of SimulationResult objects, i.e., a list of recorded frames of the simulations

  • species (list[str]) – list of species to plot

  • show_cmap (bool, optional) – Whether to show the colorbar on theplots or not. Defaults to False.

  • cmap (Union[str, np.ndarray, LookupTable], optional) – name of matplotlib colormap or custom colormap that maps scalar values to rbp. Defaults to “viridis”.

  • portrait (bool, optional) – Whether to use the smaller or larger number of plots as rows. Defaults to False.

  • titles (Union[list[dict[str, str]], None], optional) – Titles of the different plots if not just the species name is desired. Defaults to None.

  • linked_views (bool, optional) – link the view cameras. Defaults to True.

  • plotter_kwargs (dict[str, Any], optional) – Additional keyword arguments for the used pyVista.Plotter. Defaults to None. See [here](https://docs.pyvista.org/api/plotting/_autosummary/pyvista.plotter) for more information

  • plotfunc_kwargs (dict[str, dict[str, Any]], optional) – Additional keyword arguments passed to each species’ plotting call, keyed by species label. Each value is forwarded to plotter.add_mesh for that subplot. Defaults to None. Example: {“A_nucl”: {“opacity”: 0.5}, “A_cell”: {“opacity”: 0.2}}. See [here](https://docs.pyvista.org/api/plotting/_autosummary/pyvista.plotter.add_mesh#) for more information.

Returns:

path to the saved animation .mp4 file

Return type:

Union[str, Path]