An interface between Common Lisp and the Grace 2D plotting program.
Currently only tested with SBCL and Clozure CL.
Requires Grace to be installed on your system. The Grace homepage is at
The CL-GRACE system is ASDF installable. It has one dependency: CL-FAD,
for the WITH-OUTPUT-TO-TEMPORARY-FILE function.
CL-GRACE works by launching the xmgrace executable as a separate process from
within your lisp session, then sending it commands on the process's standard
If the xmgrace executable is not in your path, or otherwise not in the search
path used by your lisp when it starts a process, then set the special variable
to the full path of the xmgrace file.
The following is a quick-start guide to the low-level functional API.
To create a new plot (start an xmgrace session) do something like
(setf p (grace:new-plot))
or to open a previously saved plot (a Grace .agr project file) do
(setf p (grace:open-plot <pathname-designator>))
then to send commands do
(grace:send-command p <cmd-string>)
to save the plot do
(grace:save-plot p <pathname-designator>)
and to close the plot (quit the xmgrace session) do
For a description of commands that Grace understands see the Grace User's Guide.
For some examples of CL-GRACE usage see the examples.lisp file.
The high-level functional API is work-in-progress. It will be documented when
An MIT-style licence, which essentially means you can use the code in any way
you like as long as you retain the copyright notices.
Support for lisps other than SBCL and CCL is missing, patches welcome ...
7 April 2015