1
1
# ## 1d Lattice Simulation Plots/Animations ###
2
2
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).
4
4
function lattice_plot (
5
5
sol, sp, lrs:: LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{1, S}, T} ;
6
6
t = sol. t[end ], markersize = 20 , kwargs... ) where {Q, R, S, T}
@@ -12,7 +12,7 @@ function lattice_plot(
12
12
markersize = markersize, kwargs... )
13
13
end
14
14
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).
16
16
function lattice_animation (
17
17
sol, sp, lrs:: LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{1, S}, T} ,
18
18
filename:: String ;
@@ -40,7 +40,7 @@ function lattice_animation(
40
40
return nothing
41
41
end
42
42
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).
44
44
function lattice_kymograph (
45
45
sol, sp, lrs:: LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{1, S}, T} ;
46
46
colormap = :BuGn_7 ,
64
64
65
65
# ## 2d Lattice Simulation Plots/Animations ###
66
66
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).
68
68
function lattice_plot (sol, sp,
69
69
lrs:: LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{2, S}, T} ; t = sol. t[end ],
70
70
colormap = :BuGn_7 , plot_min = nothing , plot_max = nothing ,
@@ -80,14 +80,14 @@ function lattice_plot(sol, sp,
80
80
return heatmap (x_vals,
81
81
y_vals,
82
82
vals;
83
- axis = (xlabel = " Time " , ylabel = " Compartment" ,
83
+ axis = (xlabel = " Compartment " , ylabel = " Compartment" ,
84
84
xgridvisible = false , ygridvisible = false ),
85
85
colormap,
86
86
colorrange = (plot_min, plot_max),
87
87
kwargs... )
88
88
end
89
89
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).
91
91
function lattice_animation (
92
92
sol, sp, lrs:: LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{2, S}, T} ,
93
93
filename:: String ;
@@ -101,7 +101,7 @@ function lattice_animation(
101
101
102
102
# Creates the base figure (which is modified in the animation).
103
103
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 " ),
105
105
colormap, colorrange = (plot_min, plot_max),
106
106
kwargs... )
107
107
ttitle && (ax. title = " Time: $(round (t[1 ]; sigdigits = 3 )) " )
@@ -116,14 +116,14 @@ end
116
116
117
117
# ## 3d Lattice Simulation Plots/Animations (Errors Only) ###
118
118
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).
120
120
function lattice_plot (
121
121
sol, sp, lrs:: LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{3, S}, T} ;
122
122
kwargs... ) where {Q, R, S, T}
123
123
throw (ArgumentError (" The `lattice_plot` function does not support 3d Cartesian/masked lattices." ))
124
124
end
125
125
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).
127
127
function lattice_animation (
128
128
sol, sp, lrs:: LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{3, S}, T} ,
129
129
filename:: String ; kwargs... ) where {Q, R, S, T}
0 commit comments