[clnuplot-devel] patch: specifying arbitrary output file location

david thompson thompdump at gmail.com
Sun Feb 8 07:04:37 UTC 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/clnuplot-devel/attachments/20090208/963bf3fb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plots.lisp.patch2009-02-07
Type: application/octet-stream
Size: 1712 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/clnuplot-devel/attachments/20090208/963bf3fb/attachment.obj>


More information about the Clnuplot-devel mailing list