eazy-gnuplot icon indicating copy to clipboard operation
eazy-gnuplot copied to clipboard

Multiplots not working - wrong operation order

Open TeMPOraL opened this issue 6 years ago • 4 comments

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?

TeMPOraL avatar Apr 04 '19 11:04 TeMPOraL

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:

  • the semantics in gnuplot scripts was very awkward to me
  • I believe a plot should be treated as an image entity and the complex layout should be done outside gnuplot, such as in HTML/CSS or latex.

guicho271828 avatar Apr 05 '19 15:04 guicho271828

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

TeMPOraL avatar Apr 05 '19 16:04 TeMPOraL

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.

guicho271828 avatar Apr 06 '19 05:04 guicho271828

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 [email protected] 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 .

mmaul avatar Apr 08 '19 18:04 mmaul