Graph buffers provide the functionality of a buffer with an option to view and print the buffer contents in graphical form. Elements of a graph buffer may take one of two forms: type(DataSet, Type, Properties) or data(DataSet, X, Y), where DataSet identifies a particular data set, Type specifies the type of graph required for that data set (see below), Properties is a list of secondary properties specifying aspects of the appearance of the particular data set (see below), and X and Y are numeric values for the data set. Graph buffer elements may be matched, added or deleted, in a way analogous to elements from other classes of buffer.

There is no limit to the number of data sets that may be stored in one graph buffer. Normally there will be one type/3 element and several data/3 elements for each data set. Multiple data sets within a single graph buffer are treated independently, with the limitation that the graph axes and labels are determined by graph properties (see below), and are hence shared by all data sets within a graph.

Element Types

A type/3 term specifies the style or type of graph to be drawn for a given data set. The second argument must be one of scatter, line, or bar. The third argument species graph properties such as colour and marker style, in the form of a list of secondary properties. Thus, the following type/3 element:

type(frequency, bar, [colour(blue), fill(true)])

specifies that the graph associated with frequency should be a bar-chart drawn with blue filled bars. This could be changed to a line graph using red filled square markers (and a red line) by replacing the above element with:

type(frequency, line, [colour(red), marker(square), fill(true)])

Three kinds of secondary property are recognised: colour, fill, and marker. There are four marker types: square, circle, cross and plus.

The Graph View

Graphical buffers may be viewed as graphs by selecting the "Current Graph" view. Each data/3 element is used to construct a data point on the graph for a particular data set, with the second and third arguments specifying the coordinates (and the first argument specifying the data set). The standard printing procedures may be used to print these tables.


Graph buffers inherit all of the properties of the parent buffer class (Initialise, Decay, Decay Constant, Limited Capacity, Capacity and On Excess). They also have several additional properties that control access and appearance: