Skip to content

Commit ddece7c

Browse files
committed
init
1 parent d0fea7d commit ddece7c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/src/spatial_modelling/lattice_reaction_systems.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ lat_getu(sol, :X1, lrs)
6060
and plot the simulation using
6161
```@example spatial_intro_basics
6262
import CairoMakie
63-
lattice_animation(sol, :X1, lrs, "lattice_simulation_2d.mp4")
63+
lattice_animation(sol, :X1, lrs, "lattice_simulation.mp4")
6464
```
65-
![](./lattice_simulation_2d.mp4)
65+
![](./lattice_simulation.mp4)
6666
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).
6767

6868
## [Spatial reactions](@id spatial_lattice_modelling_intro_spatial_reactions)

ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### 1d Lattice Simulation Plots/Animations ###
22

3-
# Internal dispatch for the plotting of a lattice simulation on a 1d lattice (Cartesian or masked).
3+
# Internal dispatch for the plotting of a lattice simulation on a 1d lattice (Cartesian or masked).
44
function lattice_plot(
55
sol, sp, lrs::LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{1, S}, T};
66
t = sol.t[end], markersize = 20, kwargs...) where {Q, R, S, T}
@@ -12,7 +12,7 @@ function lattice_plot(
1212
markersize = markersize, kwargs...)
1313
end
1414

15-
# Internal dispatch for the animation of a lattice simulation on a 1d lattice (Cartesian or masked).
15+
# Internal dispatch for the animation of a lattice simulation on a 1d lattice (Cartesian or masked).
1616
function lattice_animation(
1717
sol, sp, lrs::LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{1, S}, T},
1818
filename::String;
@@ -40,7 +40,7 @@ function lattice_animation(
4040
return nothing
4141
end
4242

43-
# Internal dispatch for the kymographs of a lattice simulation on a 1d lattice (Cartesian or masked).
43+
# Internal dispatch for the kymographs of a lattice simulation on a 1d lattice (Cartesian or masked).
4444
function lattice_kymograph(
4545
sol, sp, lrs::LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{1, S}, T};
4646
colormap = :BuGn_7,
@@ -64,7 +64,7 @@ end
6464

6565
### 2d Lattice Simulation Plots/Animations ###
6666

67-
# Internal dispatch for the plotting of a lattice simulation on a 2d lattice (Cartesian or masked).
67+
# Internal dispatch for the plotting of a lattice simulation on a 2d lattice (Cartesian or masked).
6868
function lattice_plot(sol, sp,
6969
lrs::LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{2, S}, T}; t = sol.t[end],
7070
colormap = :BuGn_7, plot_min = nothing, plot_max = nothing,
@@ -80,14 +80,14 @@ function lattice_plot(sol, sp,
8080
return heatmap(x_vals,
8181
y_vals,
8282
vals;
83-
axis = (xlabel = "Time", ylabel = "Compartment",
83+
axis = (xlabel = "Compartment", ylabel = "Compartment",
8484
xgridvisible = false, ygridvisible = false),
8585
colormap,
8686
colorrange = (plot_min, plot_max),
8787
kwargs...)
8888
end
8989

90-
# Internal dispatch for the animation of a lattice simulation on a 2d lattice (Cartesian or masked).
90+
# Internal dispatch for the animation of a lattice simulation on a 2d lattice (Cartesian or masked).
9191
function lattice_animation(
9292
sol, sp, lrs::LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{2, S}, T},
9393
filename::String;
@@ -101,7 +101,7 @@ function lattice_animation(
101101

102102
# Creates the base figure (which is modified in the animation).
103103
fig, ax, hm = heatmap(x_vals, y_vals, vals[1];
104-
axis = (xgridvisible = false, ygridvisible = false),
104+
axis = (xgridvisible = false, ygridvisible = false, xlabel = "Compartment", ylabel = "Compartment"),
105105
colormap, colorrange = (plot_min, plot_max),
106106
kwargs...)
107107
ttitle && (ax.title = "Time: $(round(t[1]; sigdigits = 3))")
@@ -116,14 +116,14 @@ end
116116

117117
### 3d Lattice Simulation Plots/Animations (Errors Only) ###
118118

119-
# Internal dispatch for the plotting of a lattice simulation on a 3d lattice (Cartesian or masked).
119+
# Internal dispatch for the plotting of a lattice simulation on a 3d lattice (Cartesian or masked).
120120
function lattice_plot(
121121
sol, sp, lrs::LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{3, S}, T};
122122
kwargs...) where {Q, R, S, T}
123123
throw(ArgumentError("The `lattice_plot` function does not support 3d Cartesian/masked lattices."))
124124
end
125125

126-
# Internal dispatch for the animation of a lattice simulation on a 3d lattice (Cartesian or masked).
126+
# Internal dispatch for the animation of a lattice simulation on a 3d lattice (Cartesian or masked).
127127
function lattice_animation(
128128
sol, sp, lrs::LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{3, S}, T},
129129
filename::String; kwargs...) where {Q, R, S, T}

0 commit comments

Comments
 (0)