added captions
parent
5151adc995
commit
a9d440973c
|
|
@ -73,7 +73,7 @@ end
|
|||
function build_ui(U, V, param_obs_map::NamedTuple, params_obs, heat_obs)
|
||||
|
||||
reset!(U, V, heat_obs)
|
||||
fig = Figure(size=(1200, 950))
|
||||
fig = Figure(size=(1300, 950))
|
||||
|
||||
gh = GridLayout(fig[1, 1])
|
||||
dropdown = Menu(fig, options=collect(zip(["Gray-Scott", "FHN"], [:gray_scott, :fhn])))
|
||||
|
|
@ -99,24 +99,30 @@ function build_ui(U, V, param_obs_map::NamedTuple, params_obs, heat_obs)
|
|||
speed_slider = slidergrid.sliders[1].value
|
||||
|
||||
gh[1, 2] = templategrid = GridLayout(ax.scene, tellwidth=false)
|
||||
btn_zebra = Button(templategrid[1, 1], width=100, label="Zebra Stripes")
|
||||
btn_cheetah = Button(templategrid[1, 2], width=100, label="Cheetah Spots")
|
||||
btn_coral = Button(templategrid[1, 3], width=100, label="Coral Pattern")
|
||||
templategrid[1, 1] = Label(fig, "Templates:")
|
||||
btn_zebra = Button(templategrid[1, 2], width=100, label="Zebra Stripes")
|
||||
btn_cheetah = Button(templategrid[1, 3], width=100, label="Cheetah Spots")
|
||||
btn_coral = Button(templategrid[1, 4], width=100, label="Coral Pattern")
|
||||
|
||||
# place all the parameter boxes
|
||||
gh[2, 2] = textboxgrid = GridLayout(ax.scene, tellwidth=false)
|
||||
|
||||
param_box!(textboxgrid, 1, "Du", param_obs_map.Du, col=1)
|
||||
param_box!(textboxgrid, 2, "Dv", param_obs_map.Dv, col=1)
|
||||
param_box!(textboxgrid, 3, "Feed", param_obs_map.F, col=1)
|
||||
param_box!(textboxgrid, 4, "Kill", param_obs_map.k, col=1)
|
||||
# Create and assign column header labels
|
||||
textboxgrid[1, 1] = Label(fig, "GrayScott:", halign=:center)
|
||||
textboxgrid[1, 3] = Label(fig, "FHN:", halign=:center)
|
||||
|
||||
# GrayScott column (col 1)
|
||||
param_box!(textboxgrid, 2, "Du", param_obs_map.Du, col=1)
|
||||
param_box!(textboxgrid, 3, "Dv", param_obs_map.Dv, col=1)
|
||||
param_box!(textboxgrid, 4, "Feed", param_obs_map.F, col=1)
|
||||
param_box!(textboxgrid, 5, "Kill", param_obs_map.k, col=1)
|
||||
|
||||
# FHN column (col 2)
|
||||
param_box!(textboxgrid, 1, "Du", param_obs_map.Du, col=2)
|
||||
param_box!(textboxgrid, 2, "Dv", param_obs_map.Dv, col=2)
|
||||
param_box!(textboxgrid, 3, "ϵ", param_obs_map.ϵ, col=2)
|
||||
param_box!(textboxgrid, 4, "a", param_obs_map.a, col=2)
|
||||
param_box!(textboxgrid, 5, "b", param_obs_map.b, col=2)
|
||||
param_box!(textboxgrid, 2, "Du", param_obs_map.Du, col=2)
|
||||
param_box!(textboxgrid, 3, "Dv", param_obs_map.Dv, col=2)
|
||||
param_box!(textboxgrid, 4, "ϵ", param_obs_map.ϵ, col=2)
|
||||
param_box!(textboxgrid, 5, "a", param_obs_map.a, col=2)
|
||||
param_box!(textboxgrid, 6, "b", param_obs_map.b, col=2)
|
||||
|
||||
rowsize!(gh, 1, Relative(0.2)) # small row for the menu
|
||||
rowsize!(gh, 2, Relative(0.8))
|
||||
|
|
@ -160,7 +166,7 @@ function build_ui(U, V, param_obs_map::NamedTuple, params_obs, heat_obs)
|
|||
reset!(U, V, heat_obs)
|
||||
|
||||
end
|
||||
|
||||
|
||||
# Template Control
|
||||
on(btn_zebra.clicks) do _
|
||||
# add column to center of matrix
|
||||
|
|
@ -197,7 +203,7 @@ function build_ui(U, V, param_obs_map::NamedTuple, params_obs, heat_obs)
|
|||
# Template Control
|
||||
on(btn_coral.clicks) do _
|
||||
U, V = Templates.coral_ic(params_obs[].N)
|
||||
|
||||
|
||||
hm.colormap[] = :plasma
|
||||
|
||||
# change params
|
||||
|
|
|
|||
Loading…
Reference in New Issue