Draws polygons using high-resolution graphics (M.A. Mugglestone, S.A. Harding, B.Y.Y. Lee, P.J. Diggle & B.S. Rowlingson).
Options
TITLE = text |
Main title for the plot; default * |
---|---|
WINDOW = scalar |
Which graphics window to use for the plot; default 1 |
KEYWINDOW = scalar |
Which graphics window to use for the key; default 2 |
YTITLE = text |
Title for the vertical axis; default * |
XTITLE = text |
Title for the horizontal axis; default * |
YLOWER = scalar |
Lower limit for the vertical axis |
YUPPER = scalar |
Upper limit for the vertical axis |
XLOWER = scalar |
Lower limit for the horizontal axis |
XUPPER = scalar |
Upper limit for the horizontal axis |
SCREEN = string token |
Whether to clear the screen before plotting or to continue plotting on the old screen (clear , keep ); default clea |
KEYDESCRIPTION = text |
Overall description for the key; default * |
ENDACTION = string token |
Action to be taken after completing the plot (continue , pause ); default paus |
Parameters
YPOLYGON = variates |
Vertical coordinates of one or more polygons; no default – this parameter must be set |
---|---|
XPOLYGON = variates |
Horizontal coordinates of one or more polygons; no default – this parameter must be set |
PEN = scalars or variates or factors |
Pen number for each graph |
DESCRIPTION = texts |
Annotation for the key |
Description
DPOLYGON
draws polygons onto the current graphics device. Parameters XPOLYGON
and YPOLYGON
specify variates containing the horizontal and vertical coordinates of the polygons. DPOLYGON
uses procedure DPTMAP
to produce the plot. This uses the AXES
and FRAME
directives to set up axes with equal scales. Options YLOWER
, YUPPER
, XLOWER
and XUPPER
can be used to specify bounds for the axes, or these can be set automatically. The axes are made to extend slightly beyond the range of values to be plotted, and are drawn using the box style. Titles for the horizontal and vertical axes can be specified using the XTITLE
and YTITLE
options, respectively. Options TITLE
, WINDOW
, KEYWINDOW
, SCREEN
, KEYDESCRIPTION
and ENDACTION
are as in DGRAPH
.
By default, DPOLYGON
uses a different pen for each polygon. The sequence of pens is the same as the default sequence of pens used by DGRAPH
but the pens are set to use METHOD=line
, SYMBOLS=0
and JOIN=given
, so that each polygon is drawn as a sequence of connected line segments. Other pen styles can be specified using the PEN
parameter, except that the procedure will override settings of METHOD
, SYMBOLS
and JOIN
, replacing them by METHOD=line
, SYMBOLS=0
and JOIN=given
. The original settings will be restored on exiting the procedure. To draw polygons in a different style, for example, using lines and points, you can use DPTMAP
directly, with an appropriate PEN
setting, rather than DPOLYGON
.
Options: TITLE
, WINDOW
, KEYWINDOW
, YTITLE
, XTITLE
, YLOWER
, YUPPER
, XLOWER
, XUPPER
, SCREEN
, KEYDESCRIPTION
, ENDACTION
.
Parameters: YPOLYGON
, XPOLYGON
, PEN
, DESCRIPTION
.
Method
A procedure PTCHECKXY
is called to check that each pair of structures in XPOLYGON
and YPOLYGON
have identical restrictions. If the PEN
parameter is unset then pens with METHOD=line
and SYMBOLS=0
will be specified using the PEN
directive. PTCLOSEPOLYGON
is used to close the polygons and DPTMAP
to draw them.
Action with RESTRICT
If any of the variates in XPOLYGON
and YPOLYGON
are restricted, only the subset of values specified by the restriction will be included in the graph.
See also
Procedures: DPTMAP
, PTAREAPOLYGON
, PTCLOSEPOLYGON
, PTSINPOLYGON
.
Commands for: Graphics, Spatial statistics.
Example
CAPTION 'DPOLYGON example'; STYLE=major VARIATE xhexagon; VALUES=!(0.3,0.0,0.3,0.7,1.0,0.7) & yhexagon; VALUES=!(0.0,0.5,1.0,1.0,0.5,0.0) DPOLYGON YPOLYGON=yhexagon; XPOLYGON=xhexagon