|The GPRINT Procedure|
PROC GPRINT FILEREF=fileref
|See also:||FILENAME Statement|
|Featured in:||Adjusting the Size of Characters|
Options in the PROC GPRINT statement affect all graphs that the statement produces. You can specify as many options as you want and list them in any order.
|See also:||The Annotate Data Set|
If you do not use the CTEXT= option, a color specification is searched for in the following order:
The CTEXT= option in the PROC GPRINT statement does not affect titles and footnotes generated by TITLE and FOOTNOTE definitions.
|Featured in:||Specifying Color Text|
|See also:||Storing Graphics Output in SAS Catalogs|
|Adjusting SAS Output and Graphics Output|
The size of SAS output (or other text) in columns and rows and the size of graphics output are independently controlled. Depending on the result you want, you can do either of the following:
You can adjust the size (columns and rows) of any other
external text file that you use as input to the GPRINT procedure. Although
the following sections explain how to adjust the size of SAS output, the general
process can be applied to any text file.
SAS output prints in pages. The length (in number of rows) and the width (in number of columns) of the page are determined by the PAGESIZE= and LINESIZE= options, respectively. Each character of SAS output occupies one column of space in a row (one cell), as shown in SAS Output Size.
SAS Output Size
Graphics output is drawn in the graphics output area, which is also divided into cells. The overall dimensions of the graphics output area (width and height) are determined by the values of the device parameters XMAX and YMAX. These values, which determine the aspect ratio of the graphics output area, can be temporarily reduced with the HSIZE= and VSIZE= graphics options.
The number of columns and rows that fill the area is determined by the values of the LCOLS or PCOLS and LROWS or PROWS device parameters. These values, which determine the size and aspect ratio of a cell, can be temporarily altered with the HPOS= and VPOS= graphics options. The more columns and rows there are in a given area, the smaller the cells are. Therefore, using HPOS= and VPOS= to change the number of columns and rows also changes the size of the cells and may change the size of the characters. However, it does not affect the overall dimensions of the graph. For details, see Maintaining the aspect ratio of cells.
Procedure Output and the Graphics Output Area
for a complete description of the graphics output area. See SAS/GRAPH Programs for more information on
device parameters and graphics options.
When you use the GPRINT procedure to convert SAS output to graphics output, you may need to manipulate the dimensions of either or both to get the proper size characters in the graphics output and to avoid truncating lines. Adjustment may be necessary in the following situations:
You can adjust the size of the SAS output or the size
of the graphics output, or both.
The following steps show you how to use the PAGESIZE= and LINESIZE= options to adjust the page size of the SAS output to fit the size of the graphics output area.
The following steps show you how to use the HPOS= and VPOS= graphics options to adjust the number of columns and rows in the graphics output area on the output device so that it can accommodate the page size of your SAS output.
Similarly, adjusting the overall dimensions of the graphics output area with the HSIZE= and VSIZE= graphics options may affect the size and possibly the aspect ratio of the cells.
Changing the values of the HPOS= and VPOS= graphics options
changes the size of the cells and consequently of characters in the output.
On devices with nonscalable hardware fonts, changing the aspect ratio with
HPOS= and VPOS= causes the Simulate font to be used instead of hardware characters.
However, if you specify software fonts, the change in aspect ratio may be
ignored. See Using Fonts
and Using Hardware Fonts
for more information.
If you change the values of the HPOS= and VPOS= graphics options to control the size of characters or to match the rows and columns of the external text file, you should try to maintain the same ratio of columns to rows as the original values of the device parameters. For example, suppose you have SAS output with 50 columns and 10 rows, and a graphics device that has 80 columns and 32 rows. The aspect ratio of the device is 5:2. If you print 10 rows of output on a device with 32 rows, you will have 22 blank lines. You can reduce the number of blank lines and increase the size of the characters by reducing the number of rows in the graphics output area with VPOS=. If, in addition to the 10 rows of output, you allow four lines of space for titles and two lines of space for a footnote, you need a total of 16 rows. Therefore, assigning a value of 20 to VPOS= should produce readable text and plenty of space. If VPOS=20, setting HPOS= to 50 retains the original aspect ratio of the device (80:32 or 5:2).
Note that this method allows space for titles and footnotes in terms of rows; the actual size of the titles and footnotes depends on the height specification you use. Using the unit CELLS to define the height of titles and footnotes makes it easier to calculate precisely how much space is available.
By default, the GPRINT procedure uses the default hardware font with a height of 1 cell to display the text from the external file. However, if you specify a nonscalable hardware font, SAS/GRAPH may use the Simulate font instead. See SAS/GRAPH Fonts for details.
Font and height specifications for titles and footnotes are determined by the TITLE and FOOTNOTE definitions. See TITLE, FOOTNOTE, and NOTE Statements for details.
To specify a font and height for the text, use the FTEXT= and HTEXT= graphics options. If you specify a software font, it is best to use a uniform font such as Swiss Uniform so that your text will be evenly spaced.
If you specify a software font and change the aspect ratio of the cells with the HPOS= and VPOS= graphics options, the change in aspect ratio is ignored and the procedure continues to draw the font in the original proportions. As a result, your text may not fit the graphics output area.
However, if you want the software characters to reflect a change in aspect ratio or if you want the characters to fit the new aspect ratio even if they are distorted, use the LCOLS or PCOLS and LROWS or PROWS device parameters in the device entry to change the aspect ratio of the cells. Using the device entry to specify a change in the aspect ratio enables you to distort the characters. See The GDEVICE Procedure for more information on changing device parameters.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.