Plots a band of colours, for example, to provide a key for a heatmap (R.W. Payne).
No Options
Parameters
START = scalars or text |
Initial colour for each band; must be set |
END =scalars or text |
Final colour for each band; must be set |
MINIMUM = scalars |
Start of the range of values represented in each band; must be set |
MAXIMUM = scalars |
Endpoint of the range of values represented in each band; must be set |
NBANDS = scalar |
Number of bands in each graph; default 100 |
TITLE = texts |
Title for each graph; default * i.e. none |
WINDOW= scalars |
Window for each graph; default 1 |
ORIENTATION= string tokens |
Orientation of each test graph (horizontal, upwards, downwards); default hori |
SCREEN= string token |
Whether to clear the screen before plotting each graph (clear, keep); default clear |
Description
DBANDCOLOURSplots a band of colours corresponding to a range of values, which can be used, for example, to provide a key for a heatmap. The START and END parameters define the colours at the start and end of the band, as either a scalar containing an RGB value, or a text containing the name of one of the standard colours. (See the PEN directive for details.) The corresponding initial and final values of the variate in the heatmap are specified by the MINIMUM and MAXIMUM parameters.
The NBANDS parameter specifies the number of bands to appear in the graph. The default of 100 provides a fairly smooth gradation of colours through the plot.
ORIENTATION parameter defines the direction of the plot, with one of the following settings:WINDOW parameter specifies the window to be used for the plot (default 1), the TITLE parameter can provide a title, and the SCREEN parameter indicates whether existing plots on the screen are to be kept or cleared (default).
Options: None
Parameters: START, END, MINIMUM, MAXIMUM, NBANDS,TITLE,WINDOW, ORIENTATION, SCREEN
Method
DBANDCOLOURS uses the FHEATCOLOURS procedure to form a matrix containing RGB values of the band of colours, and then plots it using the DBITMAP directive.
See also
Directives: PEN
Procedures: DHEATMAP DDESIGN FHEATCOLOURS
GenStat Reference Manual 1 Summary section on: Graphics
Example
CAPTION 'DBANDCOLOURS example'; STYLE=meta
" define windows for a lower & a right-hand key "
FRAME 11,12; YLOWER=0,0.2; YUPPER=0.2,1;\
YMLOWER=0.15,0.1; YMUPPER=0.02,0.07;\
XLOWER=0,0.8; XUPPER=0.8,1;\
XMLOWER=0.12,0.05; XMUPPER=0.05,0.1
DBANDCOLOURS START='blue'; END='yellow'; MINIMUM=0; MAXIMUM=200; WINDOW=11
DBANDCOLOURS START='blue'; END='yellow'; MINIMUM=0; MAXIMUM=200; WINDOW=12;\
ORIENTATION=upwards; SCREEN=keep