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).
44function 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... )
1313end
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).
1616function 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
4141end
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).
4444function lattice_kymograph (
4545 sol, sp, lrs:: LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{1, S}, T} ;
4646 colormap = :BuGn_7 ,
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).
6868function 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... )
8888end
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).
9191function 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).
120120function 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." ))
124124end
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).
127127function 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