usingGLMakie, LaTeXStringsfunctionlogistic_map(x, r)return r * x * (1.0- x)endfunctionsimulate!(out, r, x0) out[1] = x0for i in2:length(out) out[i] =logistic_map(out[i-1], r)endreturn outendtsteps =100out =Vector{Float64}(undef, tsteps +1)begin f =Figure()Axis(f[1, 1], limits = (0, tsteps +1, -0.05, 1.05), xlabel ="Time", ylabel ="x") sg =SliderGrid( f[2, 1], (label = L"x_0", range =LinRange(0, 1, 201), format ="{:.2f}", startvalue =0.1), (label = L"r", range =LinRange(0, 5, 201), format ="{:.2f}", startvalue =1.0)) x0_obs, r_obs = [s.value for s in sg.sliders] trajectory =lift(x0_obs, r_obs) do x0, rsimulate!(out, r, x0)endlines!(trajectory) f end
┌ Warning: Found `resolution` in the theme when creating a `Scene`. The `resolution` keyword for `Scene`s and `Figure`s has been deprecated. Use `Figure(; size = ...` or `Scene(; size = ...)` instead, which better reflects that this is a unitless size and not a pixel resolution. The key could also come from `set_theme!` calls or related theming functions.
└ @ Makie ~/.julia/packages/Makie/We6MY/src/scenes.jl:227