GDRAW Call
draws a polyline
- CALL GDRAW(
,
, style<, color<,
window<, viewport>);
The inputs to the GDRAW subroutine are as follows:
![x](images/langref_langrefeq78.gif)
- is a vector containing the
coordinates
of points used to draw a sequence of lines.
![y](images/langref_langrefeq145.gif)
- is a vector containing the
coordinates
of points used to draw a sequence of lines.
- style
- is a numeric matrix or literal that specifies
an index corresponding to a valid line style.
- color
- is a valid SAS color, where color can be
specified as a quoted text string (such as 'RED'),
the name of a character matrix containing a valid
color as an element, or a color number (such as 1).
A color number
refers to the
th color in the color list.
- window
- is a numeric matrix or literal specifying a window.
This is given in world coordinates and has the form
| {minimum-x minimum-y maximum-x maximum-y} |
- viewport
- is a numeric matrix or literal specifying a viewport.
This is given in normalized coordinates and has the form
| {minimum-x minimum-y maximum-x maximum-y} |
The GDRAW subroutine draws a sequence of connected
lines from points represented by values in
![x](images/langref_langrefeq78.gif)
and
![y](images/langref_langrefeq145.gif)
, which must be vectors of the same length.
If
![x](images/langref_langrefeq78.gif)
and
![y](images/langref_langrefeq145.gif)
have
![n](images/langref_langrefeq53.gif)
points, there will be
![n-1](images/langref_langrefeq350.gif)
lines.
The first line will be from the
point
![(x(1),y(1))](images/langref_langrefeq351.gif)
to
![(x(2),y(2))](images/langref_langrefeq352.gif)
.
The lines are drawn in the same color and line style.
The coordinates in use for this
graphics command are world coordinates.
An example that uses the GDRAW subroutine follows:
/* line from (50,50) to (75,75) - x and y take */
/* default window range of 0 to 100 */
call gdraw({50 75},{50 75});
call gshow;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.