Low level interface to gnuplot
that provides:
- start of
gnuplot
process - passing raw
gnuplot
commands - echo printing of sent commands
Typical usage:
(start-gnuplot) ;; starts the process
(init-gnuplot) ;; optional, to initializes terminal
(hello-world) ;; plot of cos(x)
(command "command-string") ;; send command to gnuplot
(echo-command) ;; sell last sent command
For passing complex gnuplot
commands that consists of many lines,
use the send-line
and send-line-break
commands
(do-stuff (action actions)
(send-line (action->string action)))
(sent-line-break)
A companion library cl--gnuplot-command-string
provides a few
facilities for creating gnuplot commands.
The interface was developed and tested on the following platforms
- Linux &
SBCL
- Windows & Cygwin & CLISP
wgnuplot
gnuplot
was not tested in a while as I cannot get X11 on my Windows machines
- Windows & CCL
Interacting with GNUPlot on Windows does not seem as straightforward as on Linux/Darwin.
For that I introduced a user-setup package in which the user defines the path to the gnuplot executable and terminal.
Currently this is best described by code. In the lisrrc
(or
equivalent) file the following needs to be execute in the
user-setup
package (make sure the package is defined before this).
(in-package :user-setup)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defstruct (gnuplot-setup (:conc-name gnuplot-)) executable terminal))
(defparameter user-setup::*gnuplot-setup* (make-gnuplot-setup))
(setf (gnuplot-executable *gnuplot-setup*) "E:/GNUPLOT/BIN/GNUPLOT.EXE"
(gnuplot-terminal *gnuplot-setup*) :WINDOWS)
(export '(*gnuplot-setup* gnuplot-executable gnuplot-terminal) 'user-setup)
- stream plumbing is not thoroughly tested
- windows management is not implemented
- multiple windows management
- Figure out how to use clisp’s
ext:run-program
instead ofext:make-pipe-io-stream
- That would allow me to use the
external-program
package
- That would allow me to use the