Plotting on Raspberry Pi

plotting
#1

Hi, I’m exploring the use of Julia for prototyping of embedded systems on Raspberry Pi (yes, that’s a bit of a niche) and would like to know if anyone has plotting working (other than UnicodePlots) on the Raspberry Pi. I would like to implement soft real time plotting of data regarding some system being controlled / monitored via the gpios, where by “soft real time” I mean the plot would be updated at least a few times per second on a live running system. I’ve been experimenting with speed and latency of gpio control but I’m struggling to get graphics going. Thanks.

#2

Back in 0.6 era I had Plots.jl working, but I was plotting something on the order of 1/sec and didn’t have auto updating (was just serving a website pointed to the file and manually updating). I’m guessing Makie of probably a better bet for something like this, but don’t know its status on the pi.

1 Like
#3

If you can get OpenGL working then Makie should work. However, the startup time and time-to-first plot will be atrocious.

1 Like
#4

Using one of the plotting backends directly, eg GR.jl, could be viable. Time to first plot on a desktop is a few seconds. Using a process that you keep alive (eg periodically checking the filesystem for new data, plotting that, saving the output) could work for sub-second plots.

2 Likes
#5

GR.jl has a nice real-time audio demo here: https://github.com/jheinen/GR.jl/blob/master/examples/spectrum.jl
Not sure how that runs on smaller devices like a Raspberry Pi though…

3 Likes
#6

Gaston.jl is very small (less than 1500 lines of code) and uses gnuplot as a backend. I haven’t run it on a Raspberry Pi yet, but it should be fast enough to generate at least a few plots per second.

2 Likes
#7

Thanks for the feedback. If I get something working satisfactorily I’ll report back.

2 Likes