Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spatial sim aniamtions in doc #993

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/src/spatial_modelling/lattice_reaction_systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ Finally, we can access "$X1$'s value across the simulation using
```@example spatial_intro_basics
lat_getu(sol, :X1, lrs)
```
and plot the simulation using
```@example spatial_intro_basics
import CairoMakie
lattice_animation(sol, :X1, lrs, "lattice_simulation_2d.mp4")
```
```@raw html
<video autoplay loop muted playsinline controls src="../lattice_simulation_2d.mp4" />
```
More information on how to retrieve values from spatial simulations can be found [here](@ref lattice_simulation_structure_interaction_simulation_species), and for plotting them, [here](@ref lattice_simulation_plotting). Finally, a list of functions for querying `LatticeReactionSystems` for various properties can be found [here](@ref api_lattice_simulations).

## [Spatial reactions](@id spatial_lattice_modelling_intro_spatial_reactions)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/spatial_modelling/lattice_simulation_plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ If we instead wish to create an animation of our solution across the entire simu
lattice_animation(sol, :X1, lrs, "lattice_simulation_1d.mp4")
```
```@raw html
<video autoplay loop muted playsinline controls src="./lattice_simulation_1d.mp4" />
<video autoplay loop muted playsinline controls src="../lattice_simulation_1d.mp4" />
```
Since we animate the solution across the entire simulation, we do not need to provide a `t` value. However, there are some additional (optional) arguments we might wish to provide:
- `nframes = 200`: The number of frames in the animation (these are evenly samples across the simulation).
Expand Down Expand Up @@ -91,7 +91,7 @@ An animation of the solution can be created in a similar manner as for [the one-
lattice_animation(sol, :X, lrs, "lattice_simulation_2d.mp4")
```
```@raw html
<video autoplay loop muted playsinline controls src="./lattice_simulation_2d.mp4" />
<video autoplay loop muted playsinline controls src="../lattice_simulation_2d.mp4" />
```

Again, please check the API pages for the [`lattice_plot`](@ref) and [`lattice_animation`](@ref) functions to see more details of their various options.
Expand Down
Loading