There may be circumstances when it is desirable to specify the output location of the gnuplot file in a direct fashion (the current code uses ASDF to determine the output file location). The attached patch (hopefully...) allows the user to specify an arbitrary location for the gnuplot file output by WRITE-PLOT. Examples:
CLNUPLOT> (clnuplot:write-plot (clnuplot:make-plot :bar '((1 2) (2 2.5) (3 3.1) (4 3.4) (5 4.2)) :linewidth 3.0 :filename "bar123" :pathdir "/tmp/" :xlabel "Bin Number" :ylabel "Dance Partners" :x-coord #'first :y-coord #'second :title "Bin Number versus Dance Partners" :ymin 0.0) :postscript) #<GNUPLOT {B5FE309}> CLNUPLOT> (fullpath #<GNUPLOT {B5FE309}>) #P"/tmp/bar123.data"
or
CLNUPLOT> (clnuplot:write-plot (clnuplot:make-plot :bar '((1 2) (2 2.5) (3 3.1) (4 3.4) (5 4.2)) :linewidth 3.0 :filename "bar123" :pathdir (make-pathname :directory '(:absolute "tmp")) :xlabel "Bin Number" :ylabel "Dance Partners" :x-coord #'first :y-coord #'second :title "Bin Number versus Dance Partners" :ymin 0.0) :postscript) #<GNUPLOT {B0A4D99}> CLNUPLOT> (fullpath #<GNUPLOT {B0A4D99}>) #P"/tmp/bar123.data"
The original behavior of WRITE-PLOT seems to still be there:
CLNUPLOT> (clnuplot:write-plot (clnuplot:make-plot :bar '((1 2) (2 2.5) (3 3.1) (4 3.4) (5 4.2)) :linewidth 3.0 :filename "bar123" :xlabel "Bin Number" :ylabel "Dance Partners" :x-coord #'first :y-coord #'second :title "Bin Number versus Dance Partners" :ymin 0.0) :postscript) #<GNUPLOT {AC0DA99}> CLNUPLOT> (fullpath #<GNUPLOT {AC0DA99}>) #P"/root/.sbcl/site/clnuplot/plots/bar123.data"
- Alan
clnuplot-devel@common-lisp.net