How to make dynamic plots with slider bars

Like @ericphanson already pointed out, I would highly suggest you trying Blink.jl instead of Jupyter Notebooks.

I initially was creating my dynamic plots using Jupyter notebooks, but the lag was unbearable and almost impractical (even when plotting with InspectDR, which is fast).

FYI, I had the following discussion which helped me understand a bit:
Failing to port a "realistic" filter design tool · Issue #271 · JuliaGizmos/Interact.jl · GitHub

Anyways, if you want to see some examples of dynamic plots using Blink.jl (using Electron as a backend), you can look at the examples here:
https://github.com/ma-laforge/InspectDR.jl/tree/master/Blink

Here is a screen grab of “2_interact.jl”:

You don’t have to use InspectDR to get what you want, but this is a good example of what is possible when it comes to response times (interactivity).

Note that you need to add:
InspectDR, Blink, and then install AtomShell from Blink.jl

…But you need a few more packages (like DSP.jl) to get the InspecDR.jl examples running, as described in the README.md file.

Comment

If I am not mistaken, Blink.jl/Electron uses facilities in Google Chrome to draw the “GUI”.

Warning!!

I don’t know what happened, but the I just tried re-running again. Everything works well if you click on “Create GTK plot” and look at the results in the new pop-up window. However, if you look at the inline plot (top-right of screen grab), it no longer updates. Not certain why, though.

1 Like