added colorbar next to heatmap
parent
5df5384285
commit
dd3f2d6aab
|
|
@ -79,7 +79,8 @@ end
|
||||||
"""
|
"""
|
||||||
multi_step!(state, n_steps, heat_obs::Observable, params_obs::Observable; step_method=step_gray_scott!, dx=1)
|
multi_step!(state, n_steps, heat_obs::Observable, params_obs::Observable; step_method=step_gray_scott!, dx=1)
|
||||||
|
|
||||||
returns a new matrix for the heatmap for n steps of computing with the corresponding step_method
|
returns a new matrix for the heatmap for n steps of computing with the corresponding step_method.
|
||||||
|
The step_methods have different names because switching models via multi-dispatching is too complex.
|
||||||
|
|
||||||
# Arguments:
|
# Arguments:
|
||||||
- `state`: activator and inhibitor matrices
|
- `state`: activator and inhibitor matrices
|
||||||
|
|
@ -111,14 +112,18 @@ end
|
||||||
function build_ui(U, V, param_obs_map::NamedTuple, params_obs, heat_obs)
|
function build_ui(U, V, param_obs_map::NamedTuple, params_obs, heat_obs)
|
||||||
|
|
||||||
reset!(U, V, heat_obs)
|
reset!(U, V, heat_obs)
|
||||||
fig = Figure(size=(1300, 950))
|
fig = Figure(size=(1500, 950))
|
||||||
|
|
||||||
gh = GridLayout(fig[1, 1])
|
gh = GridLayout(fig[1, 1])
|
||||||
dropdown = Menu(fig, options=collect(zip(["Gray-Scott", "FHN"], [:gray_scott, :fhn])))
|
dropdown = Menu(fig, options=collect(zip(["Gray-Scott", "FHN"], [:gray_scott, :fhn])))
|
||||||
gh[1, 1] = dropdown
|
gh[1, 1] = dropdown
|
||||||
ax = Axis(gh[2, 1])
|
plotgrid = GridLayout()
|
||||||
|
gh[2, 1] = plotgrid
|
||||||
|
|
||||||
|
ax = Axis(plotgrid[1, 1])
|
||||||
|
hm = heatmap!(ax, heat_obs, colormap=:viridis)
|
||||||
|
plotgrid[1, 2] = Colorbar(fig, hm, label="Inhibitor ⇒ Activator")
|
||||||
|
|
||||||
hm = Makie.heatmap!(ax, heat_obs, colormap=:viridis)
|
|
||||||
deactivate_interaction!(ax, :rectanglezoom)
|
deactivate_interaction!(ax, :rectanglezoom)
|
||||||
ax.aspect = DataAspect()
|
ax.aspect = DataAspect()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue