Syntax
BD>plot : N1, B1 [=L1] [, B2 [=L2]] ...
where N1 is the name of a data-carrier; are the names
of bases of data-carriers, or the names of single data-carriers; and
are the names of data-carriers.
The PLOT: command is used to produce high-resolution plots in
a graphics window. The resolution of this window can be changed using
the winxsize and winysize controls of
§20.12. The command has at least two arguments. N1 is
the name of the data carrier to appear on the x-axis. The remaining
arguments define a collection of quantities, each
of which will appear on the y-axis. The result will be several
superimposed plots of N1 versus each quantity in , all plotted to the same scale. (Clearly the quantities to
appear simultaneously on the y-axis should be of similar magnitude,
otherwise the superimposed plots will be cramped in different regions
of the overall plot.)
Each data carrier to appear on the y-axis can be associated with a
labelling vector L. Further, if a base name rather than the name of a
data-carrier is associated with a labelling vector, then this labelling
vector is associated with every data carrier in the base.
Consecutive points plotted will be connected by a line if the
connect option is switched on. If the nopoints option is
also switched on, then no points, and only these connecting lines will
be drawn.
The scale of the plot is, by default, the appropriate range of x and
y values being plotted. The scaling may be changed by using the
xscale and yscale controls. For example, suppose that
the actual x and y ranges are . Then
the entire plot region will be given over to the (0,0) to (1,1) square.
However, we might wish the plot to be restricted to the top right hand
quarter, say, and issue the command
BD>control : xscale =-1,1, yscale =-1,1
Each axis is labelled according to the scales used, either default or
otherwise. The number of decimal places used is 4 by default, but this
can be changed by using the xaxisdp and yaxisdp
controls, as in the following example:
BD>control : xaxisdp =3, yaxisdp =0
Up to 26 superimposed plots are allowed, although there may be
insufficient space to report information about all of them on the
plot, and the plot itself may be hard to interpret. For unlabelled
plots, and where there are three or fewer superimposed plots, special
characters (a circle, a cross, a rectangle) are plotted for the
different y-axis quantities. For four or more unlabelled plots, the
letters of the alphabet A..Z are plotted for the y-axis
quantities. For colour screens, different combinations of colours and
line styles are used to distinguish between different plots.
It is possible to plot with a single quantity appearing on the y-axis
and up to 26 quantities appearing on the x-axis, instead. This will be
the effect of the PLOT: command if the plotxyy control
has been switched off. Otherwise the appearance of the plot is governed
by the same considerations.
The amount of data plotted will depend on the number of cases for which
observations exist on the single data-carrier to appear on the x-axis
(or instead the y-axis if the plotxyy control has been
switched off). If the autoselect control is switched on, then
all possible cases will be included. Otherwise, if a data selection has
been made using the SELECT: command, only the cases which have
been selected and for which observations on the single data
carrier exist will be included. Finally, any points corresponding to
missing data are ignored.
As an example, consider the sequence of commands given in
Figure 17.2. (See also the example given in
Figure 17.1 for a labelled low resolution plot.) Assume that
are all data carriers of length n. The
initial command ensures that all cases for which the data carrier x
has values will be included. The remaining commands
construct a base ua to contain two data carriers u1, u2, and then
construct a plot of the n pairs ,
superimposes a plot of the n pairs ,
superimposes a plot of the n pairs ,
and finally superimposes a plot of the n pairs .
The connect and nopoints options determine that the
actual points are not plotted, but joined together with a straight line.
The title of the plot as as defined in the preceding
TITLE: command.
For an example where a single y-axis data carrier y is plotted
against many x-axis quantities, see Figure 17.3 and note
the use of the plotxyy control.
Figure 17.2: Example code for a high resolution plot
Figure 17.3: Example code for multiple x-axis quantities