Displaying Graphics Output on Monitors or Terminals


If you want to see your graphics output immediately or preview it before generating a hardcopy, you can send it to your monitor or terminal.

Note: If you are using a terminal or PC that emulates a terminal, it must be a graphics terminal.

In most environments, SAS/GRAPH automatically displays graphics output in the GRAPH window. If your environment does not support the GRAPH window, SAS/GRAPH displays your graphs with the direct display method. See Displaying Graphs with Direct Display on page 50.

You can suppress the display of graphics output with the NODISPLAY graphics option. Suppressing a display is useful when you want to create only a catalog entry.

Displaying Graphs with the GRAPH Window

The GRAPH window , which is available in the SAS windowing environment, displays catalog entries of type GRSEG. You can use this window to view either the graphics output that you are currently generating or graphics output that has been stored in a catalog. You can scroll backward and forward through the catalog entries.

Some devices allow you to use up to four graph windows : GRAPH1, GRAPH2, GRAPH3, and GRAPH4. By default, the GRAPH1 window displays the graphs in the default catalog, WORK.GSEG, or the catalog that you specified with the GOUT= option.

The GRAPH window acts like other SAS windows: you can resize it and move it, and you can submit global SAS window commands from it. For details on sizing windows, see the SAS documentation for your operating environment. For a description of SAS window commands, see SAS Language Reference: Dictionary .

GRAPH window commands control how the graphs appear in the window. For a description of these commands, refer to the SAS Help facility for the GRAPH window.

Opening and Closing the GRAPH Window

The GRAPH Window opens automatically when you submit a procedure that produces graphics output, or when you select a catalog entry from the PROC GREPLAY window or from the SAS Explorer window. You can also open the GRAPH window with the GRAPH n command. The GRAPH n command opens the default catalog WORK.GSEG, or a catalog you specify, or a specific entry.

The GRAPH n command has the following form:

GRAPH n << libref .> catalog- name <. entry-name <.GRSEG>>>

n

  • is a number from 1 to 4 that indicates which GRAPH window to open.

libref

  • points to the library where the catalog is or will be stored.

catalog-name

  • is the name of the catalog whose contents you want to view. The default is WORK.GSEG. If the specified catalog does not contain any graphics entries, the window opens but is empty. The catalog assignment is temporary and remains in effect only while the GRAPH window remains open. To change the catalog, resubmit the GRAPH n command.

entry-name

  • is the name of the catalog entry that you want to view. If you omit entry-name or the entry does not exist, the last graph in the catalog is displayed. If you specify entry-name , you must also supply the libref and catalog name.

GRSEG

  • is the type of catalog entry.

To close the GRAPH window, issue the END command.

Sizing the GRAPH Window

The default size of a GRAPH window depends on the display device.

CAUTION:

  • Resizing the GRAPH window after you have displayed a graph can distort the graphs. If you replay a graph in a GRAPH window that is a different size from the size at which you created the graph, the graph may be distorted . Distortion occurs if the new HSIZE and VSIZE values do not maintain the width-to-height ratio of the original window.

Doing any of the following may change the HSIZE and VSIZE values and consequently the size of the GRAPH window:

  • changing the device driver

  • specifying a target device

  • specifying dimensions with the HSIZE= and VSIZE= graphics options.

In addition, resizing the GRAPH window can reduce the number of cells available for the output. In order to display some types of graphs in a reduced GRAPH window, you may need to increase the number of cells either by using the HPOS= and VPOS= graphics options or by modifying the device driver. To ensure that graphs have an adequate number of cells , use a full-size GRAPH window when creating the graphs.You can then reduce the window to replay the graphs. For more information on dimensions and cell size, see About the Graphics Output Area on page 34.

If you create most or all of your graphs at the same size or with the same aspect ratio, you can avoid distortion if you size the window before you draw the graphs and then use the WSAVE command to save the position and dimensions of the window. If you resize the GRAPH windows and do not use the WSAVE command, the new size is not saved, even in the same SAS session.

Displaying Graphs with Direct Display

Environments that do not support the GRAPH window use the direct display method. With this method, your display is cleared and the graph appears when you run a graphics procedure.

If the procedure produces more than one graph, you are prompted to press ENTER between each graph for the next one to be displayed. To return to your program, press END or ENTER after the last graph.

You can display the graphs automatically and control the amount of time between each graph with the GWAIT= and NOPROMPT graphics options. GWAIT= specifies the number of seconds before the next graph is drawn. NOPROMPT suppresses the delay between the graphs displayed. In this case, SAS/GRAPH automatically returns to your program after the last graph displays. (See Chapter 8, Graphics Options and Device Parameters Dictionary, on page 261 for a complete description of these graphics options.)

With the direct display method, you cannot scroll to other graphs in the catalog. To redisplay graphs, you must rerun the procedure or replay the catalog entries. For information on replaying graphs, see Chapter 43, The GREPLAY Procedure, on page 1237.




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net