DOTPLOT procedure
Produces a dot-plot using line-printer or high-resolution graphics (J. Ollerton & S.A. Harding).
Options
Parameters
Description
DOTPLOT produces a dot-plot from two parameters, a variate of x-data and a text containing y-labels. Option GRAPHICS allows the plotting to be done using line-printer graphics instead of the default high-resolution graphics.
The display takes the form of a vertical histogram, with a single row for each value of YLABELS. The length of line for each row is specified by the corresponding value of x. It is customary to sort the data according to the x-values, into either ascending or descending order. This is controlled by the DIRECTION option, which by default is ascending; setting DIRECTION=* will plot the data unsorted.
For high-resolution plots the guide lines can also be drawn across the full width of the plot (LINES=full) or can be omitted (LINES=*). By default, pens are set up to draw the dots and lines in a form appropriate for the output device. For an interactive display, solid guide lines in pale grey are used; for other devices dashed or dotted lines are used. The plotting symbol is symbol 2 (circle), except for PostScript output which uses a solid dot (SYMBOL=-9). The parameters PENDOTS and PENLINES can be used to specify pens which have been set up with different attributes.
By default the dot-plot is produced in window 1, but this can be changed using the WINDOW option. A FRAME statement can be used before using DOTPLOT to change the size and position of the display (for example to widen the x lower margin to allow more space for the y-labels). The SCREEN option controls whether or not the screen is cleared before plotting and the ENDACTION option determines what action to take after completing the plot.
An XAXIS or YAXIS statement can be used to set axis titles, and modify the upper and lower bounds of the x-axis. If TITLE is unset and axis titles are not set explicitly, they will be generated from the identifier names of the YLABEL and X parameters.
For high-resolution plots, the default window size specifies a lower x-margin of size 0.12. This allows room for a title and labels of up to about 10 characters. To produce a dot-plot with longer labels, a FRAME statement should be used to specify new dimensions for the window that include a larger value for XMLOWER. A full-size window, with standard margins, has room for about 48 rows before the labels start to overlap. To produce a dot-plot with more rows the margins should be reduced or the axis pen size reduced.
Options: GRAPHICS, TITLE, WINDOW, SCREEN, ENDACTION, DIRECTION, LINES.
Parameters: YLABELS, X, PENDOTS, PENLINES.
Method
A y-variate is constructed with values 1...NVALUES(YLABELS) and plotted against the variate X. If required the variates are sorted (this action is performed on duplicates of the data so as not to alter the original variates).
Action with
RESTRICT
DOTPLOT will obey restrictions on either YLABELS or X.
Reference
Cleveland, W.S. (1985). The Elements of Graphing Data. Wadsworth advanced books and software.