Introduction

Scientific plotting programs fall into two main categories. The first is the non interactive type represented by most mainframe plotting programs which require that the plot be specified as a file of plotting instructions. This file is edited using a text editor and then the plot is generated by executing this file. The second major type of plotting programs are those popularized on PCs which allow a user to specify the drawing using a mouse and are inherently interactive. This type of program is easier to use and it is possible to rapidly make changes. It is however not ideal since the drawing is usually stored in a proprietary, non-text format which is difficult to interpret. This makes the task of reusing parts of a previous drawing in a new drawing or simply plotting new data in an old figure difficult or impossible. Furthermore, these programs invariably do not have the flexibility to handle the needs of preparing scientific plots. Splot has been developed with the goal of bridging these two disparate approaches in an attempt to gain the benefits of both.

Splot is geared towards generating two dimensional, publication quality scientific plots as painlessly as possible without sacrificing flexibility and power. Splot contains much of the functionality of Postscript TM and can thus be used as a general purpose drawing tool. Furthermore, it has functions specifically aimed at producing plots of x,y data pairs. Splot generates a drawing by interpreting a C program which specifies the drawing. Unlike traditional mainframe plotting programs this happens quickly since the interpreter and editor are integrated into splot. Specifying the plot in a powerful programming language has several advantages. Since C is currently the most popular programming language in existence many people will already be familiar with its use. This makes C a much better choice than developing a specialized language to be interpreted. Having the drawing specified by a programming language also gives algorithmic capabilities thus allowing repetitive components of a drawing to be generated using a standard loop construct. Data to be plotted can also be manipulated before drawing using the built in standard C math library. C also allows parts of a drawing that are to be used more than once to be specified as a subroutine. This sub component can then be drawn anywhere in the final drawing by first specifying a translation, scale and rotation and then calling the subroutine. Lastly, the description of the drawing is in plain ASCII text allowing it to be easily understood and transferred electronically. Splot contains a built in drawing and plotting function library whose members are called by the C interpreter to generate the drawing.