DMASS procedure

Plots discrete data like mass spectra, discrete probability functions (J.W. McNicol).


Options

X = variate
Positions on the x-axis at which to plot the lines; default uses 1, 2 ...

TITLE = text
Title for the graph; default * i.e. none

WINDOW = scalar
Window for the graph; default 3

YTITLE = texts
Title for the y-axis

XTITLE = texts
Title for the x-axis

YMARKS = scalars or variates
Distance between each tick mark on y-axis (scalar) or positions of the marks (variate)

XMARKS = scalars or variates
Distance between each tick mark on x-axis (scalar) or positions of the marks (variate)

YMPOSITION = strings
Position of the tick marks across the y-axis (left, right, centre); default left

XMPOSITION = strings
Position of the tick marks across the x-axis (above, below, centre); default * i.e. none

YLABELS = texts
Labels at each mark on y-axis

XLABELS = texts
Labels at each mark on x-axis

PENAXES = scalar
Pen to be used for axes and their titles; default 1

PENTITLE = scalar
Pen to use for the title; default 1

LINETHICKNESS = scalar
Thickness for the vertical lines representing the mass heights; default 1

SCREEN = string
Whether to clear screen before displaying the graph (keep, clear); default clea


Parameters

Y = variates
Heights for the masses

LINECOLOUR = scalars
Colours for the vertical lines representing mass heights; default 1, 2....


Description

DMASS produces plots appropriate for ordered discrete data such as mass spectra, discrete probability functions or principal component weights. The Y parameter specifies one or more variates, each of which defines the heights of a set of vertical lines. By default the lines are plotted at equal unit spacing along the x-axis (i.e. at positions 1, 2 and so on), but other positions can be specified using the X option. The X and Y variates must all have equal lengths. So, for example, if a particular line is absent for one of the spectra, the variate must contain a zero value. The LINECOLOUR parameter defines the colour to be used for each set. By default, the colours 1, 2 and so on are used in turn.

   As usual, options TITLE, WINDOW and SCREEN allow you to define a title for the plot, specify which window to use, and indicate whether or not to clear the screen beforehand. Likewise, options YTITLE, XTITLE, YMARKS, XMARKS, YMPOSITION, XMPOSITION, YLABELS and XLABELS define titles, tick marks and labelling of the axes, as in the AXES directive. The pens to use for the title and for the axes can be defined by the PENTITLE and PENAXES options, and the LINETHICKNESS option controls the thickness of the lines used to plot the masses.

 

Options: X, TITLE, WINDOW, YTITLE, XTITLE, YMARKS, XMARKS, YMPOSITION, XMPOSITION, YLABELS, XLABELS, PENTITLE, PENAXES, LINETHICKNESS, SCREEN.

Parameters: Y, LINECOLOUR.


Method

For the ith mass, a pair of variates of length 2 is created; y=[mass,0] and x=[i,i]. These are plotted by the DGRAPH directive with METHOD=line.


Action with RESTRICT

DMASS takes account of restrictions on X or any of the Y variates.