guicho271828 / eazy-gnuplot

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

Multiplots not working - wrong operation order #40

Open TeMPOraL opened 5 years ago

TeMPOraL commented 5 years ago

Attached is a screenshot of the example code from Cookbook (plot-positioning-plot) and how it executes on current eazy-gnuplot and gnuplot:

2019-04-04_13-40

As you can see in the debug output in the SLIME window (right), the plot commands are reordered in a way that bundles all plot invocations together.

The culprit seems to be this fragment of call-with-plots:

(concatenate 'string
             (get-output-stream-string before-plot-stream)
             (get-output-stream-string *plot-command-stream*)
             (get-output-stream-string *data-stream*)
             (get-output-stream-string after-plot-stream))

Is there another way one could make arbitrarily positioned plots?

guicho271828 commented 5 years ago

hmmm... I was not a big fan of multiplot but @mmaul added the feature anyways. I never used the feature myself. Not a fan because:

TeMPOraL commented 5 years ago

The multiplot feature isn't just for composing independent plots; it's crucial for assembling some plots that are conceptual units composed of different pieces. For example, a scatterplot matrix - a very popular tool in data analysis:

http://bastian.rieck.ru/blog/posts/2017/scatterplot_matrices_gnuplot/

or a plot with auxiliary plots on the margins:

http://gnuplot.sourceforge.net/demo_canvas_5.1/margins.html

guicho271828 commented 5 years ago

thanks for the info, TIL. The complicated implementation in the current %plot function is related to the gnuplot script requirement of how the inline data for the plot should be written. Perhaps using the temporary file could help improve the current implementation.

mmaul commented 5 years ago

That was what the set syntax was for to do the ordering, but it was clunky and got pulled would be nice if we can find a way to maintain the ordering.

On Sat, Apr 6, 2019 at 1:44 AM Masataro Asai notifications@github.com wrote:

thanks for the info, TIL. The complicated implementation in the current %plot function is related to the gnuplot script requirement of how the inline data for the plot should be written. Perhaps using the temporary file could help improve the current implementation.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/guicho271828/eazy-gnuplot/issues/40#issuecomment-480476549, or mute the thread https://github.com/notifications/unsubscribe-auth/AACFkHjM3PlO2cpKpIPRjFixzb3OBDMFks5veDRTgaJpZM4ccmKI .