Graphics Examples |
IML graphics commands are available in the form of call subroutines. They generally take a set of required arguments followed by a set of optional arguments. All graphics primitives take window and viewport as optional arguments. Some IML graphics commands, like GPOINT or GPIE, accept implicit repetition factors in the argument lists. The GPOINT command places as many markers as there are well-defined pairs. The GPIE command draws as many slices as there are well-defined pies. In those cases, some of the attribute matrices can have more than one element, which are used in order. If an attribute list is exhausted before the repetition factor is completed, the last element of the list is used as the attribute for the remaining primitives.
The arguments to the IML graphics commands are positional. Thus, to skip over an optional argument from the middle of a list, you must specify a comma to hold its place. For example, the following command omits the third argument from the argument list:
call gpoint(x,y, ,"red");
The following list details the arguments commonly used in IML graphics commands:
You can change the default color with the GSET command.
The default pattern set by the IML graphics subsystem is "E," that is, empty. The default pattern can be changed by using the GSET command.
call gopen("plota");Graphics segments are not allowed to have the same name as an existing segment. If you try to create a second segment named PLOTA (that is, when the replace flag is turned off), then the second segment is named PLOTA1. The replace flag is set by the GOPEN command for the segment that is being created. To open a new segment named PLOTA and replace an existing segment with the same name, use the following statement:
call gopen("plota",1);If you do not specify a replace argument to the GOPEN command, the default is set by the GSTART command for all subsequent segments that are created. By default, the GSTART command sets the replace flag to 0, so that new segments do not replace like-named segments.
SAS/IML graphics commands are described in detail in Chapter 20.
Refer also to SAS/GRAPH Software: Reference for additional information.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.