DOTHISTOGRAM procedure
Plots dot histograms (L.S. Schmitt).
Options
Parameters
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 to define the colour to be used for the dots. Alternatively, you can supply a variate or a 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.
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.
Action with
RESTRICT
DATA variates or the GROUPS factor can be restricted to exclude units from the plot.