The following is an overview of the plot source. To access this from the Project Manager, copy to the source into any directory, preserving subdirectories, and define a folder Plot that points to the source directory.
The source is in three subdirectories:
- base has the core utilities
- out has the output definitions (isi, eps and pdf)
- type has code for the specific plot types, 2d and 3d
This defines the core user function, pd .
Input commands are stored in the Pcmd command buffer, with minimal parsing.
Output commands activate drawing. These call output verbs isi_show , pdf_show etc. Output commands are not stored in Pcmd .
This defines the core plotting routine, make . This is called by the output verbs, with an argument of output type and plot size. Output type is used only for determining font metrics.
The output of make is a global Plot that defines the plot. The output verbs then step through this global to create the actual drawing.
- the Pcmd block is split into new or use command blocks. Each such is drawn independently by makenew .
- makenew first determines several values for the command block, including dimensions, data, axes, text.
These in turn are used to determine the plot decorations (labels, ticmarks etc).
Each command block is then split into type blocks, and each such is drawn by maketype .
maketype then sets the remaning plot options, and calculates the plots for each type.
base\axis axis labels and ticmarks
base\font all font handling
base\layout main layout calculations, see Layout