using Observables, Plots
angle = Observable(pi/2)
Observable{Float64} with 0 listeners. Value: 1.5707963267948966
function plot_arc(angle_value)
angles = range(0, angle_value, length=100)
x = cos.(angles)
y = sin.(angles)
plt = plot(
x, y,
ratio=:equal,
xlims=(-1.5, 1.5), ylims=(-1.5, 1.5),
legend=:none,
framestyle=:none)
display(plt)
end
plot_arc (generic function with 1 method)
angle_observer = on(plot_arc, angle)
(::Observables.ObserverFunction) (generic function with 0 methods)
notify!(angle)
angle[] = pi*2/3
2.0943951023931953