Extra plots showing in Plots.jl with Interact

#1
using Plots
using Interact
pyplot()

N = Interact.slider(1:1:1000,label="N",value=1) |> onchange

PL = Observable(plot())
on(N) do n
    PL[] =  plot(rand(n))
end
display(N)
display(PL)

Displays two plots. The first is the intended one that changes with the slider, and the second is a blank plot. Does anyone have thoughts on how to fix this?

Thanks in advance

0 Likes