More Gnuplotting Lispers

It turns out that I’m not the only one with aspirations to be able to use gnuplot from lisp. A gentleman name Gary King has been thinking about the same thing. In his approach, he seems to generate a gnuplot file that you can then execute, while I open a pipe and send commands directly to the running process. One can see the value of both approaches, certainly.

I’m not going to be able to work on it at all for a few days, but if you want to see the lame little library that I have so far (entitled “cl-gnuplot”), I’ve posted it here. I’ve only tried it with CMUCL on Linux (Debian and Gentoo). It uses extensions:run-program, so I make no promises that it will work anywhere else. Also, it assumes that you have gnuplot in your path (Hey, it’s a work in progress…).

There are two things that you might do, just to see what it does. One generates a static graph (and breaks to wait for you to tell it when to write a postscript file and close), and the other generates an animation by refreshing the graph. Do something like this:

(in-package :cl-gnuplot)
(test-plot)
(test-animation)

I’ve gotten some great comments on my other posts, and this will evolve to take some of your suggestions into account, and to hopefully merge to some extent with Gary’s work. Any further suggestions on style, substance or features would be greatly appreciated. (I am stil a Lisp novice, after all.)

3 Responses to “More Gnuplotting Lispers”

  1. Roland

    Hello Ryan,
    is this the same cl-gnuplot as the one mentioned here?
    Could you please clarify the list I started?
    http://www.cliki.net/Common%20Lisp%20and%20gnuplot
    thanks,
    Roland

  2. Ryan

    Yes, it is.

  3. fph

    A very handy package, I had a custom plot working in minutes. Using a pipe is a great method, windoze users can get a real OS (or continue forcing the creation of limited tools that stunt growth).

    I see that gnuplot 4.2 has introduced color control, I see that I can get that now via
    (defmethod plot-cmd …

    unless perhaps this code has been improved since my last visit?

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a