Plots a bit map of RGB colours.
||General title; default
||Window number for the graph; default 1|
||Y-axis orientation of the plot (
||How to draw a grid around the elements of the matrix (
||Pen to use for the grid; default -7|
||Whether to clear the screen before plotting or to continue plotting on the old screen (
||Action to be taken after completing the plot (
||Data to be plotted|
||Row indexes for a
||Column indexes for a
DBITMAP plots a 2-dimensional bit map of RGB colours. These use a standard way of representing a colour, as a single number whose bits are partitioned into three ranges to record the three component colours of red, blue and green (see the
PEN directive for more details). They can be read in to Genstat from devices such as scanners, or calculated using the
The data are specified by the
BITMAP parameter. Data values in a regular two-way grid can be specified by supplying their RGB colours in either a matrix, a symmetric matrix, a 2-way table or a pointer to a set of variates. Alternatively, you can specify irregular data by setting
BITMAP to a variate of colours, and the
COLUMNS parameters to variates defining their row and column indexes.
GRIDMETHOD option allows you to draw an outline around each element of the plot. The
present setting produces an outline for all values that are present; i.e. it ignores missing values. This is suitable where data have been sampled over an irregularly shaped area. Alternatively, with the
complete setting, an outline is drawn around every element. By default, no grid is drawn. The
PENGRID option specifies which pen to use to draw the grid. The default is to use pen -7.
YORIENTATION option controls the orientation of the y-axis. By default this is reversed, so that the data are in the same order as they would take if the data matrix were printed.
ENDACTION options are used to specify a title, the plotting window, whether the screen should be cleared first, and whether there should be a pause once the plotting is finished; as in other graphics directives (see, for example,
DBITMAP takes account of restrictions on any of the variates in a
Commands for: Graphics.
" Example 1:6.5.1 " " Get location of image file for use by IMPORT " SCALAR _chan OPEN '%GENDIR%/Examples/GuidePart1/CapeWagtail.jpg'; _chan; FILE=input ENQUIRE CHANNEL=_chan; FILE=in; NAME=file CLOSE _chan; FILE=input IMPORT [PRINT=*; RGBMETHOD=matrix] file; COLUMNS='RGB' " resize the window to match the dimensions of the bit map " CALCULATE Nr = NROWS(RGB) & Nc = NCOLUMNS(RGB) IF Nr < Nc FRAME 3; YUPPER=Nr/Nc ELSE FRAME 3; XUPPER=Nc/Nr ENDIF DBITMAP [WINDOW=3] RGB