Common Lisp Package: MGL-GNUPLOT

Minimalistic, interactive or batch mode gnuplot interface that supports multiplots and inline data.

README:

FUNCTION

Public

Undocumented

COMMAND (COMMAND)

DATA* (DATA OPTIONS)

END-SESSION (STREAM)

FILE* (FILENAME OPTIONS)

FN* (EXPRESSION OPTIONS)

PLOT* (MAPPINGS)

SPLOT* (MAPPINGS)

START-SESSION (&KEY (BINARY *GNUPLOT-BINARY*) DISPLAY GEOMETRY (PERSISTP T) (OUTPUT *STANDARD-OUTPUT*) (ERROR *ERROR-OUTPUT*))

Private

Undocumented

KIND-TO-STRING (KIND)

PIPE-TO-GNUPLOT (INPUT &KEY (BINARY *GNUPLOT-BINARY*) DISPLAY GEOMETRY PERSISTP OUTPUT ERROR)

WRITE-OPTIONS (OPTIONS STREAM)

MACRO

Public

WITH-COMMAND-STREAM ((STREAM) &BODY BODY)

Binds *COMMAND-STREAM* to STREAM routing all command output to STREAM by default.

WITH-SESSION ((&KEY DISPLAY GEOMETRY (PERSISTP T) (OUTPUT '*STANDARD-OUTPUT*) (ERROR '*ERROR-OUTPUT*)) &BODY BODY)

Start gnuplot, bind STREAM and *COMMAND-STREAM* to its standard input. The stream is closed when BODY exits.

Undocumented

DATA (DATA &REST OPTIONS)

FILE (FILENAME &REST OPTIONS)

FN (EXPRESSION &REST OPTIONS)

PLOT (NIL &BODY MAPPINGS)

SPLOT (NIL &BODY MAPPINGS)

GENERIC-FUNCTION

Public

WRITE-COMMAND (COMMAND STREAM)

Write the gnuplot COMMAND to STREAM. Commands represented by the classes PLOT, SET-COMMAND, etc.

WRITE-DATA (DATA STREAM)

Serialize DATA to STREAM in gnuplot format.

WRITE-MAPPING (MAPPING STREAM)

Write the gnuplot MAPPING to STREAM.

SLOT-ACCESSOR

Private

Undocumented

FILENAME (OBJECT)

FUNCTION-EXPRESSION (OBJECT)

KIND (OBJECT)

MAPPING-DATA (OBJECT)

MAPPINGS (OBJECT)

SETFMAPPINGS (NEW-VALUE OBJECT)

OPTIONS (OBJECT)

VARIABLE

Public

*COMMAND-STREAM*

The default stream to which commands and inline data are written by WRITE-COMMAND.

Private

Undocumented

*GNUPLOT-BINARY*

CLASS

Public

COMMAND (COMMAND)

A gnuplot command. There are separate classes for plot/splot, etc.

DATA-MAPPING

Consider plot '-', sin(x). For gnuplot '-' indicates inline data that will be read from the command stream after all mappings are read. The DATA slot of this class holds an object that can be serialized by WRITE-DATA.

FILE-MAPPING

When the data comes from a file. As in plot 'filename' title 'something'.

MAPPING

A plot can contain multiple mappings. For example in plot sin(x) title 'sine', "datafile" with lines there is a function and a file mapping. Subclasses of MAPPING represent the function or the data and the options (e.g. 'title', 'with' above).

Undocumented

FUNCTION-MAPPING

PLOT (NIL &BODY MAPPINGS)