guicho271828 / eazy-gnuplot

Super Duper Doopa Booka Lispy Gnuplot library
http://guicho271828.github.io/eazy-gnuplot/
63 stars 8 forks source link

Fix plotting multiple series with the same function #45

Open TimoWilken opened 2 years ago

TimoWilken commented 2 years ago

If plot gets a function producing data, but multiple :using args, it currently reads all the output from the function on the first go, and subsequent :using args don't have anything left to plot.

Instead, save the data produced by the function for later, and output it every time.

This should fix #42.

I suppose a better way to do this would be to declare the data once in a gnuplot data block (as mentioned in #42) and then refer to it one or multiple times, but then eazy-gnuplot would require gnuplot >= 5.0.