POLYGON
Name:
Type:
Diagrammatic Graphics Command
Purpose:
Description:
The POLYGON command takes an array of x-coordinates and an
array of y-coordinates and draws the polygon defined by these
points.
Although Dataplot provides many specific geometric figures, the
POLYGON command provides the most flexible option. That is,
you can create an arbitrarily complex geometric figure to
append to a plot.
Syntax 1:
POLYGON <x> <y>
<SUBSET/EXCEPT/FOR qualification>
where <x> is an array of x coordinates;
<y> is an array of y coordinates;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional and rarely used in this context.
In this syntax, the coordinates are specified in absolute
0 to 100 Dataplot screen units.
Syntax 2:
POLYGON DATA <x> <y>
<SUBSET/EXCEPT/FOR qualification>
where <x> is an array of x coordinates;
<y> is an array of y coordinates;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional and rarely used in this context.
In this syntax, the coordinates are specified in absolute
units of the most recent plot.
Syntax 3:
POLYGON RELATIVE <x> <y>
<SUBSET/EXCEPT/FOR qualification>
where <x> is an array of x coordinates;
<y> is an array of y coordinates;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional and rarely used in this context.
In this syntax, the first coordinate is specified in absolute
0 to 100 Dataplot screen units. Subsequent points are
relative to the prior point (i.e., point 2 is relatvie to
point 1, point 3 is relative to point 2, etc.) in Dataplot
0 to 100 screen units.
Syntax 4:
POLYGON RELATIVE DATA <x> <y>
<SUBSET/EXCEPT/FOR qualification>
where <x> is an array of x coordinates;
<y> is an array of y coordinates;
and where the <SUBSET/EXCEPT/FOR qualification>
is optional and rarely used in this context.
In this syntax, the first coordinate is specified in absolute
units of the most recent plot. Subsequent points are
relative to the prior point (i.e., point 2 is relatvie to
point 1, point 3 is relative to point 2, etc.) in units of
the most recent plot.
Examples:
LET X = DATA 0.5 1.5 1.5 0.5 0.5
LET Y = DATA 0 0 10 10 0
POLYGON DATA X Y
Note:
The line style (i.e., SOLID, DASH), line color, and line
thickness for drawing the border of the polygon are dictated
by the first entry of the LINE, LINE COLOR, and LINE THICKNESS
commands respectively. The attributes of the interior of the
polygon are controlled by the various REGION attribute commands
(e.g., REGION FILL, REGION FILL COLOR).
Note:
Dataplot will automatically check if the first point is equal
to the last point. If not, Dataplot adds a point to close the
polygon.
Default:
Synonyms:
Related Commands:
|
BOX
|
= Draws a box.
|
|
CIRCLE
|
= Draws a circle.
|
|
ARC
|
= Draws an arc.
|
|
DRAW
|
= Draws a line.
|
|
MOVE
|
= Moves to a point.
|
|
LINES
|
= Sets the line type for figures and plot lines.
|
|
LINE THICKNESSES
|
= Sets the line tthicknesses for figures and plot
lines.
|
|
LINE COLOR
|
= Sets the line colors for figures and plot lines.
|
|
CROSS-HAIR
|
= Activates and reads the cross-hair.
|
|
TEXT
|
= Writes a text string.
|
|
REGION FILL
|
= Specifies the fill attribute of a region.
|
|
REGION BASE
|
= Specifies the base for region fills (REGION BASE
POLYGON is an alternative way to draw polygons).
|
Applications:
Implementation Date:
Program:
SKIP 25
READ TEXAS.DAT X Y
.
PLOT Y X
.
REGION FILL ON
REGION FILL COLOR G90
POLYGON DATA X Y
Date created: 6/5/2001
Last updated: 4/4/2003
Please email comments on this WWW page to
alan.heckert@nist.gov.
|