Common Lisp and gnuplot

Interfaces to gnuplot

Currently (2016-12) the only gnuplot libraries maintained in quicklisp are vgplot, CLNUPlot and eazy-gnuplot.

below are historical notes

As there are now at least two (see here and here) mostly private projects that attempt to connect Common Lisp to gnuplot, Gary think it's time to come together and think about a way to do this that feels nice and Lispy.

Both Ryan and Gary are busy and work on these things when demand arises so it's unlikely that we'll see rapid progress - how's that for dampening enthusiasm! On the other hand, if the people show an interest, I'm (Gary) willing to start a project over at common-lisp.net so that people can begin fooling around.

In the meantime, please add your comments below on what you think a Lispy gnuplot should feel like.

Maybe we should start listing the existing libraries, comment on their features before designing? Here is the beginning of such a list:

  1. Sam Steingold's CLLIB contains an interface to gnuplot.
  2. another project has been mentioned here: cgn . At the moment, It has been tested on Linux and Windows, but should work on MacOS X, OpenBSD ... That's thanks to it using LTK for the pipe. Now I'm adding some sugar like facilities to set titles, grids, to do scatter plots with errorbars, etc. Now can save postscript copies of you graphs
  3. Gary's CLNUPlot)
  4. Ryan's cl-gnuplot
  5. Wheeler Ruml's plot package. "I have not prepared this code for distribution in any way", he states on his page.
  6. David Wallis' NLISP
-- Roland Kaufmann

Are we discussing a gnuplot specific interface or a generic interface?

Good question. From the title of the page and the list I started, I would say not for the moment, but when designing a generic interface, it would be a good idea to keep other backends in mind. I am not familiar with either plotutils or Dataplot, but note that gnuplot has been chosen as plotter for a several programs (Emacs Calc, GNU Octave, R, Maxima, (not sure about Axiom)) -- Roland Kaufmann

See also the plotting page.


Things what I (Felip) think an interface to gnuplot must have:
  1. A pipe that works on the more important OS: Linux, Windows, BSDs and MacOS X. This can be done through Ltk or kmrcl. It would be nice if we use a third's library, which should not be mantained by us.
  2. Facilities to do the more common actions: setting titles, ranges, doing function and scatter plots ...
  3. Facilities to save copies of the graphics, and to print them directly
  4. A nice lispy interface
  5. Some kind of facility to write directly to the pipe. This way, users can use features which are not wrapped by the library
  6. Don't know how possible or easy this'd be, but it'd be nice to have some kind of "callbacks", so that you can define functions in Lisp which are then sampled/plotted in Gnuplot.