From thompdump at gmail.com Sun Feb 8 07:04:37 2009 From: thompdump at gmail.com (david thompson) Date: Sun, 8 Feb 2009 02:04:37 -0500 Subject: [clnuplot-devel] patch: specifying arbitrary output file location Message-ID: 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) # CLNUPLOT> (fullpath #) #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) # CLNUPLOT> (fullpath #) #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) # CLNUPLOT> (fullpath #) #P"/root/.sbcl/site/clnuplot/plots/bar123.data" - Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- 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: From thompdump at gmail.com Mon Feb 9 16:05:05 2009 From: thompdump at gmail.com (david thompson) Date: Mon, 9 Feb 2009 11:05:05 -0500 Subject: [clnuplot-devel] followup: specifying arbitrary output file location Message-ID: It would give users even more flexibility if they had the capability not only to explicitly define the location of the gnuplot 'data' file ( http://common-lisp.net/pipermail/clnuplot-devel/2009-February/000008.html) but to also have the capability to explicitly specify the location of the rendered (graphical) version of the chart/plot. Something like (defun fullname-rendered (plot type) (let ((fullpath (fullpath plot))) (namestring (make-pathname ;; strip type info :name (pathname-name fullpath) :directory (pathname-directory fullpath) :type type)))) and then a modification of each 'set output' line for gnuplot (in the various WRITE-PLOT definitions) to something like (format out "set output '~A'~C" (fullname-rendered plot "ps") #\Linefeed)) seems like it would do the trick... - Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: From gwking at metabang.com Mon Feb 9 16:57:50 2009 From: gwking at metabang.com (Gary King) Date: Mon, 9 Feb 2009 11:57:50 -0500 Subject: [clnuplot-devel] followup: specifying arbitrary output file location In-Reply-To: References: Message-ID: <9BECC35F-3400-4970-9226-3320643B387B@metabang.com> Hi David (Alan?). good idea. I'll add this sometime this week. On Feb 9, 2009, at 11:05 AM, david thompson wrote: > It would give users even more flexibility if they had the capability > not only to > explicitly define the location of the gnuplot 'data' file (http://common-lisp.net/pipermail/clnuplot-devel/2009-February/000008.html > ) > but to also have the capability to > explicitly specify the location of the rendered (graphical) version > of the chart/plot. > > Something like > > (defun fullname-rendered (plot type) > (let ((fullpath (fullpath plot))) > (namestring (make-pathname > ;; strip type info > :name (pathname-name fullpath) > :directory (pathname-directory fullpath) > :type type)))) > > and then a modification of each 'set output' line for gnuplot (in > the various WRITE-PLOT definitions) to something like > > (format out "set output '~A'~C" > (fullname-rendered plot "ps") > #\Linefeed)) > > seems like it would do the trick... > > - Alan > _______________________________________________ > clnuplot-devel mailing list > clnuplot-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/clnuplot-devel -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: From ofossg at gmail.com Wed Feb 11 18:15:05 2009 From: ofossg at gmail.com (Olav Fossgaard) Date: Wed, 11 Feb 2009 19:15:05 +0100 Subject: [clnuplot-devel] Error using exponential notation? Message-ID: <499315A9.4000404@gmail.com> |There seems to be a bug plotting small numbers using exponential notation. For example: (clnuplot:write-plot (clnuplot:make-plot :lines-points '((1 0.10) (2 3.0E-5) (3 4.0E-5)) :pointsize 2.0 :linewidth 3.0 :filename "simple-example" :xlabel "foo" :ylabel "bar" :x-coord #'first :y-coord #'second :title "foobar" :ymin 0.0) :pdf) The plotted points are ((1 0.10) (2 3) (3 4)), and it seems the exponential parts are ignored. However, if we increase the exponents a couple of orders of magnitude (replace E-5 with E-3), the points are plotted correctly. Olav Fossgaard|