Hi there
I have a simple interactive plot (in Pluto) that is slow - and should benefit from using Blink instead. I have spent the last day trying to make it work, but I just can’t figure out how to.
Could someone please show me how to translate this into a plot that displays interactively in Blink? I’m agnostic to the back-end - PlotlyJS / InspectDR. A working example would be really really good!
@bind θ Slider(0:0.05:2π+0.1, show_value=true)
Q = [cos(θ) -sin(θ)
sin(θ) cos(θ)]
Λ = [2 0; 0 0.5]
QΛQh(x) = Q * Λ * Q' * x
ts = 0:0.01:2π
Qs = [QΛQh([cos(t), sin(t)]) for t in ts]
xs = [q[1] for q in Qs]
ys = [q[2] for q in Qs]
plot(cos, sin, 0, 2π, ratio=1) # Plots a circle
plot!(xs, ys)
After this - I try and also show a current ‘x’ vector, and its translation on the same plot using plot!. But if someone can please show me how to send the above to Blink (with Interact or Makie or anything)- I can then do the rest.
Many thanks!