next up previous contents index
Next: Defining titles for plots Up: Plotting data Previous: Low resolution plots

High resolution plots

 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Syntax

BD>plot : N1, B1 [=L1] [, B2 [=L2]] ... tex2html_wrap_inline33712

where N1 is the name of a data-carrier; tex2html_wrap_inline39952 are the names of bases of data-carriers, or the names of single data-carriers; and tex2html_wrap_inline39954 are the names of data-carriers.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

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 tex2html_wrap_inline39930 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 tex2html_wrap_inline39930 , 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 tex2html_wrap_inline40030 . 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 tex2html_wrap_inline33712

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 tex2html_wrap_inline33712

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 tex2html_wrap_inline40032 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 tex2html_wrap_inline39936 , superimposes a plot of the n pairs tex2html_wrap_inline39938 , superimposes a plot of the n pairs tex2html_wrap_inline39940 , and finally superimposes a plot of the n pairs tex2html_wrap_inline39942 . 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.

  figure17842
Figure 17.2:  Example code for a high resolution plot

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.

  figure17905
Figure 17.3:  Example code for multiple x-axis quantities

 

 


next up previous contents index
Next: Defining titles for plots Up: Plotting data Previous: Low resolution plots

David Wooff
Wed Oct 21 15:14:31 BST 1998