GSET functions allow you to set attributes for the graphics elements. Some GSET functions set the attributes for a subset of graphics primitives. For example, attributes prefixed by FIL control the appearance of the graphics primitives GDRAW (BAR , ), GDRAW(ELLIPSE , ), GDRAW(FILL , ), and GDRAW(PIE , ). SeeTable 49.2 on page 1364 for a complete list of the attributes that control the appearance of the graphics primitives.
Some GSET functions affect the appearance of the entire graphics output. For example, GSET(HPOS , ) and GSET(VPOS , ) set the number of columns and rows for the output. See each GSET function for the aspect of the graphics output that it controls.
When using GSET functions, remember the following:
All arguments must be specified.
All arguments are specified as variables or constants. If you express an argument as a variable, the variable must be initialized .
All character arguments that are expressed as character strings must be enclosed in quotation marks.
All character variable names used as arguments must be declared in a LENGTH statement.
All character constants must be enclosed in single or double quotation marks.
GSET functions:
ASF
ASPECT
CATALOG
CBACK
CLIP
COLREP
DEVICE
FILCOLOR
FILINDEX
FILREP
FILSTYLE
FILTYPE
HPOS
HSIZE
HTML
LINCOLOR
LININDEX
LINREP
LINTYPE
LINWIDTH
MARCOLOR
MARINDEX
MARREP
MARSIZE
MARTYPE
MESSAGE
PATREP
TEXALIGN
TEXCOLOR
TEXFONT
TEXHEIGHT
TEXINDEX
TEXPATH
TEXREP
TEXUP
TRANSNO
VIEWPORT
VPOS
VSIZE
WINDOW
Specifies an aspect source flag to bundle or separate attributes
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
Default Value: INDIVIDUAL
return-code-variable =GSET(ASF , attribute, status );
The GSET(ASF , ) function sets an attribute s aspect source flag (ASF) so that it can be used in a bundle (BUNDLED) or individually (INDIVIDUAL).
If an attribute s ASF is set to BUNDLED , it cannot be used outside of a bundle. It must be defined in a GSET( xxx REP , ) function and activated with a GSET( xxx INDEX , ) function, where xxx can have one of the following values: FIL, LIN, MAR, TEX.
If an attribute s ASF is set to INDIVIDUAL , it cannot be used with a bundle. In this case, the attribute is set with a GSET( attribute , ). The values of attribute are listed in Argument Definitions.
attribute | character string enclosed in quotes or character variable name with one of the following values: |
| |
status | character string enclosed in quotation marks or character variable name; accepts either the value BUNDLED or INDIVIDUAL. |
ASF on page 1405
FILCOLOR on page 1469
FILSTYLE on page 1471
FILTYPE on page 1473
LINCOLOR on page 1476
LINTYPE on page 1479
LINWIDTH on page 1479
MARCOLOR on page 1480
MARSIZE on page 1483
MARTYPE on page 1483
TEXCOLOR on page 1488
TEXFONT on page 1489
Specifies the aspect ratio
Operating States: GKCL
Return Codes: 0, 1, 90, 307
Default Value: 0.0
return-code-variable =GSET(ASPECT , aspect );
The GSET(ASPECT , ) function sets the aspect ratio used to draw graphics output. GSET(ASPECT , ) affects only pies, arcs, and software text.
aspect | numeric constant or numeric variable name; specifies the aspect ratio and cannot be less than 0. |
ASPECT= graphics option (see ASPECT on page 262)
ASPECT on page 1406
Specifies the catalog for the graphs
Operating States: GKCL
Return Codes: 0, 1
Default Values: libref = WORK, catalog-name = GSEG
return-code-variable =GSET(CATALOG , libref, catalog-name );
The GSET(CATALOG , ) function makes the specified catalog the current catalog in which to store graphs generated with DSGI. GSET(CATALOG , ) creates the catalog if it does not exist.
The values of libref and catalog-name cannot exceed eight characters. The number of characters allowed for a catalog name varies across operating environments; see the SAS companion for your operating system. Libref should have been defined through the LIBNAME statement.
libref | character string enclosed in quotation marks or character variable name; points to the library that contains the catalog. |
catalog-name | character string enclosed in quotation marks or character variable name; specifies the catalog name to be used. |
CATALOG on page 1407
GRAPHLIST on page 1416
NUMGRAPH on page 1427
Specifies the background color
Operating States: GKCL
Return Codes: 0, 1
Default Value: 1. CBACK= graphics option, if specified; 2. device s default background color.
return-code-variable =GSET(CBACK , cback );
The GSET(CBACK , ) function sets the background color. GSET(CBACK , ) has the same effect as the CBACK= graphics option.
cback | character string enclosed in quotation marks or character variable name; can contain any predefined SAS color name. See SAS Color Names and RGB Values on page 99 for a list of predefined SAS color names. |
CBACK= graphics option (see CBACK on page 266)
CBACK on page 1408
Specifies whether clipping is on or off
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes:
Default Value: OFF
return-code-variable =GSET(CLIP , status );
The GSET(CLIP , ) function activates or suppresses clipping around the current viewport.
status | character string enclosed in quotation marks or character variable name; valid values are ON and OFF. When ON is used, the graphics elements outside of the specified viewport are not displayed. If you turn clipping OFF, the graphics elements outside of the defined viewport are displayed. |
CLIP on page 1409
VIEWPORT on page 1441
VIEWPORT on page 1497
Associates a color name with a certain color index
Operating States: SGOP
Return Codes: 0, 4, 86
Default Values: 1. colors list of COLORS= graphics option; 2. device s default colors list
return-code-variable =GSET(COLREP , color-index, color );
The GSET(COLREP , ) function associates a predefined SAS color name with a color index. Many of the GASK routines and GSET functions use color-index as an argument.
If this function is not used, DSGI searches for a color specification in the following order:
the n th color in the colors list of the COLORS= graphics option
the n th color in the device s default colors list.
color-index | numeric constant or numeric variable name; a number from 1 to 256 that identifies a color. |
color | character string enclosed in quotation marks or character variable name; a predefined SAS color name. See SAS Color Names and RGB Values on page 99 for a list of predefined SAS color names. |
COLORS= graphics option (see COLORS on page 272)
COLINDEX on page 1409
COLREP on page 1410
Specifies the output graphics device
Operating States: GKCL
Return Codes: 0, 1
Default Value: 1. DEVICE= graphics option, if specified; 2. value entered in DEVICE prompt window; 3. value entered in OPTIONS window
return-code-variable =GSET(DEVICE , device );
The GSET(DEVICE , ) function selects the device driver.
device | character string enclosed in quotation marks or character variable name; the name of the driver you will be using. Device must match one of the device entries in the SASHELP.DEVICES catalog or one of your personal device catalogs, GDEVICE0.DEVICES through GDEVICE9.DEVICES. Refer to About Device Catalogs on page 916 for more information about catalogs that store device entries. |
DEVICE= graphics option (see DEVICE on page 279)
DEVICE on page 1411
Specifies the color index of the color used to draw fill areas
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 85
Default Value: 1
return-code-variable =GSET(FILCOLOR , color-index );
The GSET(FILCOLOR , ) function selects the color index of the color used to draw fill areas. The aspect source flag (ASF) of FILCOLOR must be set to INDIVIDUAL for this attribute to be used outside of a fill bundle.
DSGI searches for a color to assign to the index in the following order:
the color specified for the index in a GSET(COLREP , ) function
the n th color in the colors list of the COLORS= graphics option
the n th color in the device s default colors list found in the device entry.
color-index | numeric constant or numeric variable name; indicates the index of the color to be used. Valid values are 1 to 256, inclusive. |
COLORS= graphics option (see COLORS on page 272)
ASF on page 1463
COLREP on page 1467
FILCOLOR on page 1412
FILREP on page 1470
Specifies the index of the bundle of fill area attributes
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 75
Default Value: 1
return-code-variable =GSET(FILINDEX , index );
The GSET(FILINDEX , ) function activates a particular fill bundle. The aspect source flag (ASF) for FILCOLOR, FILSTYLE, and FILTYPE must be set to BUNDLED before the associated GDRAW function is executed if you want the bundled values to be used when the affected graphics element is drawn.
index | numeric constant or numeric variable name; specifies the index number of the fill bundle. Valid values are 1 to 20, inclusive. |
FILINDEX on page 1413
ASF on page 1463
FILREP on page 1470
Associates a bundle of fill attributes with an index
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 75, 78, 85
Default Value: none
return-code-variable=GSET (FILREP , index, color-index, interior, style-index );
The GSET(FILREP , ) function assigns a color, type of interior, and style of the interior to a specific fill bundle. The aspect source flags for FILCOLOR, FILTYPE, and FILSTYLE must be set to BUNDLED before the associated GDRAW function is executed if you want the bundled values to be used when the affected graphics element is drawn.
index | numeric constant or numeric variable name; indicates the index to be used with the bundle. Valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable name must be initialized to a value between 1 and 20. |
color-index | numeric constant or numeric variable name; indicates the index of the color to be used. Valid values are 1 to 256, inclusive. The color index should represent one of the following: |
| |
interior | character string enclosed in quotation marks or character variable name; indicates the type of interior. Valid values are |
| |
style-index | numeric constant or numeric variable name; indicates the index of the style to be used. Valid values are 1 to 15, inclusive, when FILTYPE is PATTERN, or 1 to 60, inclusive, when FILTYPE is HATCH. See the GSET(FILSTYLE , ) function FILSTYLE on page 1471 for a table of the patterns used for each style index. If interior is HOLLOW or SOLID, style-index is ignored. |
FILREP on page 1413
ASF on page 1463
COLREP on page 1467
FILCOLOR on page 1469
FILINDEX on page 1470
FILSTYLE on page 1471
FILTYPE on page 1473
Specifies the style of the interior of the fill area when the FILTYPE is PATTERN or HATCH
Operating State: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 78
Default Value: 1
return-code-variable =GSET(FILSTYLE , style-index );
The GSET(FILSTYLE , ) function activates a particular fill pattern when FILTYPE is specified as either PATTERN or HATCH. The aspect source flag (ASF) must be set to INDIVIDUAL for this attribute to be used outside of a fill bundle.
Value | PATTERN | HATCH | Value | PATTERN | HATCH |
---|---|---|---|---|---|
1 | X1 | M1X | 31 | M3N045 | |
2 | X2 | M1X030 | 32 | M3N060 | |
3 | X3 | M1X045 | 33 | M3N090 | |
4 | X4 | M1X060 | 34 | M3N120 | |
5 | X5 | M1N | 35 | M3N135 | |
6 | L1 | M1N030 | 36 | M3N150 | |
7 | L2 | M1N045 | 37 | M4X | |
8 | L3 | M1N060 | 38 | M4X030 | |
9 | L4 | M1N090 | 39 | M4X045 | |
10 | L5 | M1N120 | 40 | M4X060 | |
11 | R1 | M1N135 | 41 | M4N | |
12 | R2 | M1N150 | 42 | M4N030 | |
13 | R3 | M2X | 43 | M4N045 | |
14 | R4 | M2X030 | 44 | M4N060 | |
15 | R5 | M2X045 | 45 | M4N090 | |
16 | M2X060 | 46 | M4N120 | ||
17 | M2N | 47 | M4N135 | ||
18 | M2N030 | 48 | M4N150 | ||
19 | M2N045 | 49 | M5X | ||
20 | M2N060 | 50 | M5X030 | ||
21 | M2N090 | 51 | M5X045 | ||
22 | M2N120 | 52 | M5X060 | ||
23 | M2N135 | 53 | M5N | ||
24 | M2N150 | 54 | M5N030 | ||
25 | M3X | 55 | M5N045 | ||
26 | M3X030 | 56 | M5N060 | ||
27 | M3X045 | 57 | M5N090 | ||
28 | M3X060 | 58 | M5N120 | ||
29 | M3N | 59 | M5N135 | ||
30 | M3N030 | 60 | M5N150 |
style-index | numeric constant or numeric variable name. Valid values are 1 to 15, inclusive, when FILTYPE is PATTERN, or 1 to 60, inclusive, when FILTYPE is HATCH. See Table 49.1 on page 1360 for value specifications. |
FILSTYLE on page 1414
ASF on page 1463
FILREP on page 1470
FILTYPE on page 1473
Specifies the type of the interior of the fill area
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 78
Default Value: HOLLOW
return-code-variable =GSET(FILTYPE , interior );
The GSET(FILTYPE , ) function selects a particular type of interior fill. If FILTYPE is set to HATCH or PATTERN, the GSET(FILSTYLE , ) function determines the type of hatch or pattern fill used. The aspect source flag (ASF) for FILTYPE must be set to INDIVIDUAL for this attribute to be used outside of a fill bundle.
interior | character string or character variable name; indicates the type of interior fill. Valid values are |
|
ASF on page 1463
FILREP on page 1470
FILSTYLE on page 1471
Specifies the number of columns
Operating States: GKCL
Return Codes: 0, 1, 90, 307
Default Value: 1. HPOS= graphics option, if specified; 2. device s default HPOS setting
return-code-variable =GSET(HPOS , hpos );
The GSET(HPOS , ) function sets the number of columns in the graphics output area. GSET(HPOS , ) has the same effect as the HPOS= graphics option. See HPOS on page 315 for more information. You can reset the HPOS value by submitting one of the following statements:
goptions reset=goptions; goptions reset=all; goptions hpos=0;
hpos | numeric constant or numeric variable name; specifies the number of horizontal columns; must be greater than 0. |
HPOS on page 1417
HSIZE on page 1418
VPOS on page 1442
HPOS= graphics option (see HPOS on page 315)
Specifies the horizontal dimension of the graphics output area
Operating States: GKCL
Return Codes: 0, 1, 90, 307
Default Value: 1. HSIZE= graphics option, if specified; 2. HSIZE device parameter
return-code-variable =GSET(HSIZE , hsize );
The GSET(HSIZE , ) function sets the horizontal dimension, in inches, of the graphics output area. GSET(HSIZE , ) affects the dimensions of the default window. You can reset the HSIZE value by submitting one of the following statements:
goptions reset=goptions; goptions reset=all; goptions hsize=0;
hsize | numeric constant or numeric variable name; specifies the horizontal dimension, in inches, of the graphics output area; must be greater than 0. |
HSIZE on page 1418
HPOS on page 1474
VSIZE on page 1499
HSIZE= graphics option (see HSIZE on page 315)
Specifies the HTML string to invoke when an affected DSGI graphic element in a web page is clicked
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
Default Value: null
return-code-variable =GSET(HTML , string );
The GSET(HTML , ) function sets the HTML string to invoke when an affected DSGI graphic element in a web page is clicked. The HTML string is used with ODS processing to create a drill-down graph. The string value is used as the value for the HREF= attribute in the image map that implements the drill-down capability.
The value for string must be HREF= followed by a valid URL that is specified in double quotation marks, as in
rc = GSET('HTML', 'HREF="http://www.sas.com/"');
The HTML string can be used by any of the following graphic element types drawn in the code: BAR, ELLIPSE, FILL, MARK, PIE, and TEXT. The string applies to all of these element types that are drawn after the string is set. To change the HTML string, set a new value. To turn off the HTML string, specify a null string:
rc = GSET('HTML', '');
For more information on drill-down graphs, see Adding Drill-Down Links to Web Presentations on page 571. For an example of how to use DSGI to generate a drill-down graph, see Generating a Drill-down Graph Using DSGI on page 1395.
string | the HTML string. The string must be enclosed in single quotation marks and must begin with HREF= followed by a URL that is enclosed in double quotation marks. |
HTML on page 1418
BAR on page 1448
ELLIPSE on page 1450
FILL on page 1451
MARK on page 1453
PIE on page 1455
TEXT on page 1456
Specifies the color index of the color used to draw lines
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 85
Default Value: 1
return-code-variable =GSET(LINCOLOR , color-index );
The GSET(LINCOLOR , ) function selects the index of the color used to draw lines. The aspect source flag (ASF) for LINCOLOR must be set to INDIVIDUAL for this attribute to be used outside of a line bundle.
DSGI searches for a color specification in the following order:
the color specified for the index in a GSET(COLREP , ) function
the n th color in the colors list of the COLORS= graphics option
the n th color in the device s default colors list found in the device entry.
color-index | numeric constant or numeric variable name; indicates the index of the color to use. Valid values are 1 to 256, inclusive. |
COLORS= graphics option (see COLORS on page 272)
LINCOLOR on page 1419
ASF on page 1463
COLREP on page 1467
LINREP on page 1478
Specifies the index of the bundle of line attributes
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 60
Default Value: 1
return-code-variable =GSET(LININDEX , index );
The GSET(LININDEX , ) function activates a particular line bundle. The aspect source flags (ASF) of LINCOLOR, LINTYPE, and LINWIDTH must be set to BUNDLED before the associated GDRAW function is executed if you want the bundled values to be used when the affected graphics element is drawn.
index | numeric constant or numeric variable name; indicates the index of the bundle to activate. Valid values are 1 to 20, inclusive. |
LININDEX on page 1420
ASF on page 1463
LINREP on page 1478
Associates a bundle of line attributes with an index
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 60, 62, 85, 90
Default Value: none
return-code-variable =GSET(LINREP , index, color-index, width, type );
The GSET(LINREP , ) function assigns a color, width, and line type to a specific line bundle. The aspect source flags (ASF) for LINCOLOR, LINWIDTH, and LINTYPE must be set to BUNDLED before the associated GDRAW function is executed if you want the bundled values to be used when the affected graphics element is drawn.
index | numeric constant or numeric variable name; indicates the number for the bundle to use as an index. Valid values are 1 and 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20. |
color-index | numeric constant or numeric variable name; specifies the index of the color to use. Valid values are 1 to 256, inclusive. The color index should represent one of the following: |
| |
width | numeric constant or numeric variable name; indicates the width of the line; must be greater than 0. |
type | numeric constant or numeric variable name; indicates the type of line. Valid values are 1 to 46, inclusive. See Figure 7.22 on page 208 for representations of the different line types. |
ASF on page 1463
COLREP on page 1467
LINCOLOR on page 1476
LININDEX on page 1477
LINREP on page 1478
LINTYPE on page 1479
LINWIDTH on page 1479
Specifies the line type
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 62
Default Value: 1
return-code-variable =GSET(LINTYPE , type );
The GSET(LINTYPE , ) function selects a line type. See Figure 7.22 on page 208 for representations of the different line types. The aspect source flag (ASF) for LINTYPE must be set to INDIVIDUAL for this attribute to be used outside of a line bundle.
type | numeric constant or numeric variable name; indicates the type of line to use. Valid values are 1 to 46, inclusive. |
LINTYPE on page 1421
ASF on page 1463
LINREP on page 1478
Specifies the thickness of the line
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 90
Default Value: 1
return-code-variable =GSET(LINWIDTH , width );
The GSET(LINWIDTH , ) function selects a line width in units of pixels. The aspect source flag (ASF) for LINWIDTH must be set to INDIVIDUAL for this attribute to be used outside of a line bundle.
width | numeric constant or numeric variable name; specifies the width of the line in pixels; must be greater than 0. |
LINWIDTH on page 1422
ASF on page 1463
LINREP on page 1478
Specifies the color index of the color used to draw markers
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 85
Default Value: 1
return-code-variable =GSET(MARCOLOR , color-index );
The GSET(MARCOLOR , ) function selects the color index of the color used to draw markers. The aspect source flag (ASF) of MARCOLOR must be set to INDIVIDUAL for this attribute to be used outside of a marker bundle.
DSGI searches for a color specification in the following order:
the color specified for the index in a GSET(COLREP , ) function
the n th color in the colors list of the COLORS= graphics option
the n th color in the device s default colors list found in the device entry.
color-index | numeric constant or numeric variable name; indicates the index of the color to use. Valid values are 1 to 256, inclusive. |
COLORS= graphics option (see COLORS on page 272)
MARCOLOR on page 1423
ASF on page 1463
COLREP on page 1467
MARREP on page 1482
Specifies the index of the bundle of marker attributes
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 64
Default Value: 1
return-code-variable =GSET(MARINDEX , index );
The GSET(MARINDEX , ) function activates the marker bundle indicated by index . The aspect source flag (ASF) for MARCOLOR, MARTYPE, and MARSIZE must be set to BUNDLED before the GDRAW(MARK , ) function is executed if you want the bundled values to be used when the marker is drawn.
index | numeric constant or numeric variable name; the number of the bundle to activate. Valid values are 1 to 20, inclusive. |
MARINDEX on page 1424
ASF on page 1463
MARREP on page 1482
Associates a bundle of marker attributes with an index
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 64, 66, 85, 90
Default Value: none
return-code-variable =GSET (MARREP , index, color-index, size , type );
The GSET(MARREP , ) function assigns a color, size, and type of marker to a specific marker bundle. The aspect source flag (ASF) of MARCOLOR, MARSIZE, and MARTYPE must be set to BUNDLED before the GDRAW(MARK , ) function is executed if you want the bundled values to be used when the marker is drawn.
index | numeric constant or numeric variable name; defines the bundle index number. Valid values are 1 to 20, inclusive. |
color-index | numeric constant or numeric variable name; indicates the color index of the color to use. Valid values are 1 to 256, inclusive. The color index should represent one of the following: |
| |
size | numeric constant or numeric variable name; indicates the size of the marker in units of the current window system; must be greater than 0. |
type | numeric constant or numeric variable name; specifies the type of marker to use; valid values are 1 to 67, inclusive. See Table 50.2 on page 1484 for a table of the symbols used for each marker type. |
Values and Markers | |||||
---|---|---|---|---|---|
1 | plus | 24 | K | 46 | 9 |
2 | x | 25 | L | 47 | lozenge |
3 | star | 26 | M | 48 | spade |
4 | square | 27 | N | 49 | heart |
5 | diamond | 28 | O | 50 | diamond |
6 | triangle | 29 | P | 51 | club |
7 | hash | 30 | Q | 52 | shamrock |
8 | Y | 31 | R | 53 | fleur-delis |
9 | Z | 32 | S | 54 | star |
10 | paw | 33 | T | 55 | sun |
11 | point | 34 | U | 56 | Mercury |
12 | dot | 35 | V | 57 | Venus |
13 | circle | 36 | W | 58 | Earth |
14 | A | 37 |
| 59 | Mars |
15 | B | 38 | 1 | 60 | Jupiter |
16 | C | 39 | 2 | 61 | Saturn |
17 | D | 40 | 3 | 62 | Uranus |
18 | E | 41 | 4 | 63 | Neptune |
19 | F | 42 | 5 | 64 | Pluto |
20 | G | 43 | 6 | 65 | moon |
21 | H | 44 | 7 | 66 | comet |
22 | I | 45 | 8 | 67 | asterisk |
23 | J |
ASF on page 1463
COLREP on page 1467
MARCOLOR on page 1480
MARINDEX on page 1481
MARSIZE on page 1483
MARTYPE on page 1483
Selects the size of markers
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 90
Default Value: 1
return-code-variable =GSET(MARSIZE , size );
The GSET(MARSIZE , ) function sets the marker size in units of the current window system. The aspect source flag (ASF) of MARSIZE must be set to INDIVIDUAL for this attribute to be used outside of a marker bundle.
size | numeric constant or numeric variable name; indicates the size of the marker in units of the current window system; must be greater than 0. |
MARSIZE on page 1425
ASF on page 1463
MARREP on page 1482
Selects the kind of markers
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 66
Default Value: 1
return-code-variable =GSET(MARTYPE , type );
The GSET(MARTYPE , ) function determines the type of marker drawn. See Figure 7.21 on page 202 for representations of the symbols described in Table 50.2 on page 1484. The aspect source flag (ASF) of MARTYPE must be set to INDIVIDUAL for this attribute to be used outside of a marker bundle.
type | numeric constant or numeric variable name; indicates the index of the marker to draw. Valid values are 1 to 67, inclusive. See Table 50.2 on page 1484 for value specifications. |
MARTYPE on page 1426
ASF on page 1463
MARREP on page 1482
Specifies whether the interface error message system is enabled or disabled
Operating States: All
Return Codes:
Default Value: ON
return-code-variable =GSET(MESSAGE , status );
The GSET(MESSAGE , ) function activates or suppresses automatic error logging.
status | character string enclosed in quotation marks or character variable name; indicates whether messages should be displayed. Valid values are ON and OFF. When ON is used, messages are automatically generated by the DSGI based on the return code from the function. If you set MESSAGE to OFF, no messages are automatically printed. You may choose to do this if you want to print custom messages for your application or decide which error message you want printed. |
MESSAGE on page 1454
GPRINT on page 1402
Specifies the pattern name of a style index for a particular fill type.
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 79
Default value: 1
return-code-variable =CALL GSET(PATREP , index, pattern-name, hatch-name );
The GSET(PATREP , ) function sets a pattern of a style index for a particular fill type.
index | numeric variable name; indicates the index of the pattern to be used. |
pattern-name | character variable name; sets the name of the pattern at the specified index. |
hatch-name | character variable name; sets the name of the hatch at the specified index. |
PATREP on page 1429
Specifies the horizontal and vertical alignment of the text string
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
Default values: halign =NORMAL, valign =NORMAL
return-code-variable =GSET(TEXALIGN , halign, valign );
The GSET(TEXALIGN , ) function sets a particular type of horizontal and vertical alignment for text strings. Figure 50.5 on page 1487 illustrates halign .
Figure 50.6 on page 1487 illustrates valign .
halign | character string enclosed in quotation marks or character variable name. Valid values are |
| |
valign | character string enclosed in quotation marks or character variable name. Valid values are |
|
TEXALIGN on page 1430
TEXT on page 1456
TEXPATH on page 1491
TEXUP on page 1493
Specifies the color index of the color used to draw text strings
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 85
Default Value: 1
return-code-variable =GSET(TEXCOLOR , color-index );
The GSET(TEXCOLOR , ) function selects the color for text. The aspect source flag (ASF) of TEXCOLOR must be set to INDIVIDUAL for this attribute to be used outside of a text bundle.
The value of GSET(TEXCOLOR , ) can be used in a text bundle. See the TEXREP on page 1492 for information on how to define a text bundle.
DSGI searches for a color specification in the following order:
the color specified for the index in a GSET(COLREP , ) function
the n th color from the colors list of the COLORS= graphics option
the n th color in the device s default colors list found in the device entry.
color-index | numeric constant or numeric variable name; indicates the color index of the color to be used. Valid values are 1 to 256, inclusive. |
COLORS= graphics option (see COLORS on page 272)
TEXCOLOR on page 1431
ASF on page 1463
COLREP on page 1467
TEXREP on page 1492
Specifies the font used to draw text strings
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
Default values: 1. FTEXT= graphics option, if specified; 2. hardware font, if possible; 3. SIMULATE font
return-code-variable =GSET(TEXFONT , font );
The GSET(TEXFONT , ) function selects a SAS/GRAPH font for the text. The aspect source flag (ASF) of TEXFONT must be set to INDIVIDUAL for this attribute to be used outside of a text bundle. See Font Lists on page 82 for a list of valid SAS/GRAPH fonts. You may also use fonts you have created using the GFONT procedure.
font | character string enclosed in quotation marks or character variable name; the name of a font that can be accessed by SAS/GRAPH software. If you want to use the hardware font, submit |
rc=gset('texfont', ' '); |
When DSGI is used with long font names, the font name must be in double quotation marks that are embedded in single quotation marks, as in HW font name .
FTEXT= graphics options (see FTEXT on page 294)
TEXFONT on page 1434
ASF on page 1463
TEXREP on page 1492
Specifies the character height of the text string
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 73
Default Value: 1. HTEXT= graphics option, if specified; 2. 1 unit
return-code-variable =GSET(TEXHEIGHT , height );
The GSET(TEXHEIGHT , ) function sets the height for text. GSET(TEXHEIGHT , ) affects text the same way as the HTEXT= graphics option.
height | numeric constant or numeric variable name; indicates height in units based on the current window system; must be greater than 0. |
TEXHEIGHT on page 1435
HTEXT= graphics options (see HTEXT on page 316)
Specifies the index of the bundle of text attributes
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 68
Default Value: 1
return-code-variable =GSET(TEXINDEX , index );
The GSET(TEXINDEX , ) function activates the text bundle indicated by index . The aspect source flag (ASF) for TEXCOLOR and TEXFONT must be set to BUNDLED before the GDRAW(TEXT , ) function is executed if you want the bundled values to be used when the text is drawn.
index | numeric constant or numeric variable name; indicates the number of the bundle to activate. Valid values are 1 to 20, inclusive. |
TEXINDEX on page 1436
ASF on page 1463
TEXREP on page 1492
Specifies the direction of the text string
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8
Default Value: RIGHT
return-code-variable =GSET(TEXPATH , path );
The GSET(TEXPATH , ) function selects a particular type of text path. Text path determines the direction in which the text string reads. Figure 50.7 on page 1492 illustrates the text paths that can be used with DSGI.
path | character string enclosed in quotation marks or character variable name; specifies the direction in which the text will read. Valid values are
|
TEXPATH on page 1436
TEXT on page 1456
TEXALIGN on page 1486
TEXUP on page 1493
Associates a bundle of text attributes with an index
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 68, 85
Default Value: none
return-code-variable =GSET (TEXREP , index, color-index, font );
The GSET(TEXREP , ) function assigns a color and font to a particular text bundle. The aspect source flags (ASF) of TEXCOLOR and TEXFONT must be set to BUNDLED before the GDRAW(TEXT , ) function is executed if you want the bundled values to be used when the text is drawn.
index | numeric constant or numeric variable name; specifies the number to use as an index for the bundle; valid values are 1 to 20, inclusive. If index is expressed as a variable, the variable must be initialized to a value between 1 and 20. |
color-index | numeric constant or numeric variable name; indicates the color to use; valid values are 1 to 256, inclusive. The color index should represent one of the following:
|
font | character string enclosed in quotation marks or character variable name; names the font to use with the bundle. See Font Lists on page 82 for a list of valid SAS/GRAPH fonts. You may also use fonts you have created using the GFONT procedure. |
COLORS= graphics option (see COLORS on page 272)
TEXREP on page 1437
ASF on page 1463
COLREP on page 1467
TEXINDEX on page 1490
Specifies the orientation (angle) of the text string
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 74
Default Values: upx =0, upy =1
return-code-variable =GSET(TEXUP , upx, upy );
The GSET(TEXUP , ) function sets the angle of the text string. DSGI uses the values of character up vectors to determine the angle of a text string. The character up vector has two components , upx and upy , that describe the angle at which the text string is placed. The angle is calculated with the following formula:
angle=atan(upx/upy)
Effectively, when DSGI is calculating the angle for the text, it uses upx and upy as forces that are pushing the string toward an angle. The natural angle of text in the upx direction is toward the 6 o clock position. In the upy direction, text naturally angles at the 3 o clock position. If upx is greater than upy , the text is angled toward 6 o clock. If upy is greater than upx , the text is angled toward 3 o clock. Figure 50.8 on page 1494 shows the angle of text when the values for upx and upy are (0.0, 1.0) and (1.0, 0.0).
As you change the values of upx and upy , the coordinate that has the highest value is taken as the angle, and the lowest value as the offset. Figure 50.9 on page 1495 shows the angle of text when the character up vector values (+1.0, +0.5) are used.
You can use the following macro to convert angles measured in degrees to character up vectors:
%macro angle(x); if mod(&x, 180)=90 then do; if mod(&x, 270) = 0 then xup = 1.0; else xup = 1.0; rc = gset('texup', xup, 0.0); end; else do; b = mod(&x, 360); /* adjust y vector for 2nd and 3rd quadrants */ if b > 90 and b lt 270 then yup = 1.0; else yup = 1.0; a=&*1.7453292519943300e 002; xup = tan( a); /* adjust x vector for 3rd quadrant */ if b > 180 and b le 270 then xup = xup; rc = gset('texup', xup, yup); end; %mend angle; data _null_; rc = ginit(); rc = graph('clear', 'angle'); rc = gset('texalign', left', 'base'); rc = gset('texheight', 5); rc = gset('texfont', 'swissl'); %angle(180); rc = gdraw('text', 50, 50, '180'); %angle(80); rc = gdraw('text', 50, 50, 80); %angle(600); rc = gdraw('text', 50, 50, 600); rc = graph('update'); rc = gterm(); run;
upx | numeric constant or numeric variable name; if upy is 0, upx cannot be 0. |
upy | numeric constant or numeric variable name; if upx is 0, upy cannot be 0. |
TEXUP on page 1438
TEXT on page 1456
TEXALIGN on page 1486
TEXPATH on page 1491
Specifies the number of the transformation to be used
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 50
Default Value:
return-code-variable =GSET(TRANSNO , n );
The GSET(TRANSNO , ) function activates the viewport and/or window you have defined for the specified transformation number. If you have not defined both a viewport and window for a transformation, the default is used for the one missing.
You can select 0 as the active transformation, but you cannot define a viewport or window for that transformation number. A transformation of 0 activates the default viewport, (0, 0) to (1, 1), and window, which is device dependent.
n | numeric constant or numeric variable name; indicates the viewport and/or window to activate; should correspond to the n used in the GSET(VIEWPORT , ) and/or GSET(WINDOW , ) functions. Valid values are 0 to 20, inclusive. |
TRANS on page 1439
TRANSNO on page 1440
VIEWPORT on page 1441
WINDOW on page 1444
VIEWPORT on page 1497
WINDOW on page 1500
Associates a viewport with a transformation number
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 50, 51, 52
Default Values: llx =0, lly =0, urx =1, ury =1
return-code-variable =GSET(VIEWPORT , n, llx, lly, urx, ury );
The GSET(VIEWPORT , ) function defines a viewport and associates it with the transformation number, n . See the TRANSNO on page 1496 for information on how to activate the viewport. See the WINDOW on page 1500 for information on how to define a window to be used within the viewport.
n | numeric constant or numeric variable name; specifies the transformation number of the viewport. Valid values are 1 to 20, inclusive. |
llx | numeric constant or numeric variable name; defines the x component of the lower-left corner of the viewport; must not exceed the value of urx ; cannot be less than 0. Units are based on percent of the graphics output area. |
lly | numeric constant or numeric variable name; defines the y component of the lower-left corner of the viewport; must not exceed the value of ury ; cannot be less than 0. Units are based on percent of the graphics output area. |
urx | numeric constant or numeric variable name; defines the x component of the upper-right corner of the viewport; cannot be greater than 1. Units are based on percent of the graphics output area. |
ury | numeric constant or numeric variable name; defines the y component of the upper-right corner of the viewport; cannot be greater than 1. Units are based on percent of the graphics output area. |
VIEWPORT on page 1441
WINDOW on page 1500
TRANSNO on page 1496
TRANSNO on page 1440
TRANS on page 1439
WINDOW on page 1444
Specifies the number of rows
Operating States: GKCL
Return Codes: 0, 1, 90, 307
Default Values: 1. VPOS=graphics option, if specified; 2. device s default VPOS value
return-code-variable =GSET(VPOS , vpos );
The GSET(VPOS , ) function sets the number of rows in the graphics output area. GSET(VPOS , ) has the same effect on graphics output as the VPOS= graphics option.
You can reset the VPOS value by submitting one of the following statements:
goptions reset=goptions; goptions reset=all; goptions vpos=0;
vpos | numeric constant or numeric variable name; specifies the number of rows in the graphics output area; must be greater than 0. |
VPOS on page 1442
HPOS on page 1474
VSIZE on page 1499
VPOS= graphics option (see VPOS on page 360)
Specifies the vertical dimension of the graphics output area
Operating States: GKCL
Return Codes: 0, 1, 90, 307
Default Values: 1. VSIZE= graphics option, if specified; 2. device s default VSIZE value
return-code-variable =GSET(VSIZE , vsize );
The GSET(VSIZE , ) function sets the vertical dimension, in inches, of the graphics output area. GSET(VSIZE , ) affects the dimensions of the default window.
You can reset the VSIZE value by submitting one of the following statements:
goptions reset=goptions; goptions reset=all; goptions vsize=0;
vsize | numeric constant or numeric variable name; indicates the vertical dimension for the graph in inches; must be greater than 0. |
VSIZE on page 1443
HSIZE on page 1475
VPOS on page 1498
VSIZE= graphics option (see VSIZE on page 361)
Associates a window with a transformation number
Operating States: GKOP, SGOP, WSAC, WSOP
Return Codes: 0, 8, 50, 51
Default Values: llx =0, lly =0; urx and ury are device dependent
return-code-variable =GSET (WINDOW , n, llx, lly, urx, ury );
The GSET(WINDOW , ) function defines a window and associates it with a transformation number. See the TRANSNO on page 1496 for information on how to activate a window. See the VIEWPORT on page 1497 for information on how to define a viewport for a window.
n | numeric constant or numeric variable name; specifies the transformation number of the window. Valid values are 1 to 20, inclusive. |
llx | numeric constant or numeric variable name; defines the x component of the lower-left corner of the window; must not exceed the value of urx . Units are based on percent of the active viewport. |
lly | numeric constant or numeric variable name; defines the y component of the lower-left corner of the window; must not exceed the value of ury . Units are based on percent of the active viewport. |
urx | numeric constant or numeric variable name; defines the x component of the upper-right corner of the window. Units are based on percent of the active viewport. |
ury | numeric constant or numeric variable name; defines the y component of the upper-right corner of the window. Units are based on percent of the active viewport. |
TRANS on page 1439
TRANSNO on page 1440
VIEWPORT on page 1441
WINDOW on page 1444
TRANSNO on page 1496
VIEWPORT on page 1497