DOTHISTOGRAM procedure

Plots dot histograms (L.H. Schmitt).


Options

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

AXISTITLE = text
Title for the axis representing the data values; default * uses the name of the DATA variate if there is only one, otherwise no title

WINDOW = scalars
Window for the plot; default 3

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

ORIENTATION = string
Direction of the plot (horizontal, vertical); default vert

JUSTIFICATION = string
How to position the dots; (right, left, centre, center, bottom, top, backtoback); default cent

CREATEMISSINGLEVEL = text
Whether to create a level for missing GROUP data (yes, no); default no

OMITEMPTYLEVELS = text
Whether to omit levels of GROUPS for which there are no DATA values to plot (yes, no); default no

SIZE = scalar
Size of the pen used to plot the dots; default 1


Parameters

DATA = variates or pointers
Data to be plotted

GROUPS = factors
Factor to divide values of a DATA variate into groups

COLOURS = scalars, variates, texts or factors
Colour for plotting symbols, a variate or factor allows different colours to be used for different sets of units; default 'black'

NOBSERVATIONS = tables
Save tables of count


Description

Dot histograms display each observation in a set of values as a dot. The observations are allocated to bins, of equal range, and all the observations in a bin are plotted in a row. The values are supplied by the DATA parameter. If this is a variate and the GROUPS parameter is set, then dot histograms are plotted side-by-side, one for each level of the grouping factor. If DATA is set to a pointer of variates, a dot histogram is plotted for each variate, side-by-side, and the GROUPS parameter is ignored. The COLOURS parameter allows you to specify a scalar or single-valued text to define the colour to be used for the dots. Alternatively, you can supply a variate, text or factor, with a value for each dot histogram in a plot. The NOBSERVATIONS parameter can save a two-way table of the number of dots in each row for each dot histogram in the plot.

   The options of the procedure mainly control the plotting; titles for the graph (TITLE) and for the axis along which the values are displayed (AXISTITLE), which window to use for the plot (WINDOW), and whether or not to clear the screen before plotting (SCREEN). By default, the dot histograms are plotted vertically with a row for each bin arranged along the y-axis, but you can set option ORIENTATION=horizontal to plot the histograms horizontally and the dots are then in columns. Rows of dots in each dot histogram are usually centred on the X-axis (for ORIENTATION=vertical) but the JUSTIFICATION option gives control over this. They can be either centred (the default), right justified, left justified, top justified, bottom justified, or back-to-back to plot adjacent dot histograms back to back. The left and right settings and the top and bottom settings are provided for vertical and horizontal dot histograms, respectively, but left and bottom are synonyms as are right and top. By default, any units with missing values in the GROUPS factor are ignored, but you can set option CREATEMISSINGLEVEL=yes to create a level for these units. Also, by default, a null (blank) dot histogram is included for levels of the GROUPS factor that are unrepresented in the DATA variate but you can set option OMITEMPTYLEVELS=yes to omit these. This will also omit null dot histograms for variates with no observations in a DATA pointer. Option SIZE can be used to make the dots smaller or larger. This can alter the number of bins into which the data set is divided. The value of SIZE is reduced if the supplied value would cause dots to overlap.

 

Options: TITLE, AXISTITLE, WINDOW, SCREEN, ORIENTATION, JUSTIFICATION, CREATEMISSINGLEVEL, OMITEMPTYLEVELS, SIZE.

Parameters: DATA, GROUPS, COLOURS, NOBSERVATIONS.


Method

The dot histograms are plotted by DGRAPH, using the solid dot symbol. The colours of the histograms are defined by using the settings from the COLOUR parameter of DOHISTOGRAM in the COLOUR parameter of the PEN directive. See PEN for details of GenStat interprets strings (defined by a text setting) or numbers (defined by a scalar or variate, or by the levels of a factor setting) as colours.


Action with RESTRICT

DATA variates or the GROUPS factor can be restricted to exclude units from the plot.