[ANN] ImPlot.jl -- FAST real-time plotting for CImGui.jl

I wrapped a really nice plotting extension called implot, a C++ plugin for Dear ImGui. With some clutch help from @Gnimuc and the magic of BinaryBuilder.jl this package can be imported into a Julia session that’s using CImGui.jl and everything should “JustWork”.

The plotting is straight forward and, notably, quite fast even with 100s of thousands of points. There’s also optional arguments to do strided/offset array access for interleaved data. Generally a nice solution for anyone that wants to do real-time visualization of analog or digital sensor data (in my case, electrophysiology signals).

If there’s interest from the community, I might go to the effort of documenting it a little more thoroughly and throwing it up on the registry.

41 Likes

This is great. Also, not so great as I am now thoroughly confused about what plotting library to switch over to from ggplot. There is Plots.jl which is the most native and FTOP is reduced significantly in 1.5, there is VegaLite.jl which somewhat follows the Grammar of Graphics of ggplot, there is gnuplot.jl which is my top contender to switch to, Makie.jl which seems more tedious than necessary, but packs some serious power, and a few others I can’t recall.

But this is great. Will definitely try it out in the next few days :grinning:

Implot, along with ImGui, is mainly for writing GUI tools. You could play with it online. :wink:

https://traineq.org/imgui_manual/src/imgui_manual.html

https://traineq.org/implot_demo/src/implot_demo.html

Would it make sense to integrate ImPlot.jl into CImGui.jl ?

This is great. I needed a real-time vizualisation lib, so today I decided “Let me ask on the Julia discourse about the situation of real-time vizualisation libs. No, first let me search to see what has currently been announced.”

So I found this thread. Started 11 hours ago! How lucky :slight_smile:

Now excuse my breathtaking ignorance, but… From what I understand this is a wrapper to some C or C++ libs (great!). But the demo (which @gnimuc posted) is on the browser. How does that work?

Those demos are done independently by some other people, who got it running in the browser with emscripten + WebGL afaik. The Julia libraries here are calling natively compiled binaries and use an OpenGL backend. The performance is slower in the browser, but it’s also easy to give someone a link to see what’s going on.

1 Like

That’s exactly what I wanted to hear, thank you :smile:

Thankyou. I bought a pulse oximeter sensor and a three lead heart sensor for my Pi or Jetson Nano. This will be ideal to display traces from these.

Di dI say traces? Yes indeed - I am old enough to have used pen plotters.

6 Likes

My lab has rolls of old chart paper in the back of a cabinet somewhere. Still call them traces from time to time :slight_smile:

1 Like