DPOLYGON procedure
Draws polygons using high-resolution graphics (M.A. Mugglestone, S.A. Harding, B.Y.Y. Lee, P.J. Diggle & B.S. Rowlingson).
Options
Parameters
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.