SAS Device Driver and Graphics Output Settings - Prof. Mervyn G. Marasinghe, Study notes of Statistics

The sas device driver, its role in determining graphic output settings, and how users can override these settings using goptions statements in sas/graph procedures. It covers device parameters, resolution, graphics output area size, and user customization options.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-pfu
koofers-user-pfu 🇺🇸

1

(2)

10 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
SAS Device Driver consists of an executable program and a
device entry that contains a set of setting for the device parame-
ters (e.g., HSIZE=, etc) that determine the default appearance
of graphic output on a particular device.
GOPTIONS statement and options in SAS/GRAPH proce-
dure statements allow the user to override these device para-
meter settings for the duration of a SAS session until the user
resets them or change them by executing another GOPTIONS
statement.
SAS Graph obtains these values from the device driver for the
default device or a specified device for producing graphics output
to be displayed on that device.
Device parameters XMAX= and YMAX= determine the size of
the display area for a device. For a monitor the display area is
the same as the graphics output area. For a hardcopy device,
such as graphics printers and plotters, HSIZE= and VSIZE=
define a smaller area, so a margin is possible.
The user can change the size of the graphics output area by
specifying new values for HSIZE=, VSIZE= in a GOPTIONS
statement or other SAS/GRAPH procedure statements. For a
monitor display device HSIZE=, VSIZE= are set to zero be-
cause the entire area of a graphics window is used to display the
graphics output.
Device Resolution is the number of pixels/inch defined for
a particular device, in both vertical and horizontal directions.
For e.g., the PSCOLOR device driver setting defines the x-
resolution to be 300 pixels/inch (or 300 dpi for dots per inch) i.e.
3300pixels/11.00inches. Changing HSIZE=, VSIZE= will not
affect the resolution.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download SAS Device Driver and Graphics Output Settings - Prof. Mervyn G. Marasinghe and more Study notes Statistics in PDF only on Docsity!

  • SAS Device Driver consists of an executable program and a device entry that contains a set of setting for the device parame- ters (e.g., HSIZE=, etc) that determine the default appearance of graphic output on a particular device.
  • GOPTIONS statement and options in SAS/GRAPH proce- dure statements allow the user to override these device para- meter settings for the duration of a SAS session until the user resets them or change them by executing another GOPTIONS statement.
  • SAS Graph obtains these values from the device driver for the default device or a specified device for producing graphics output to be displayed on that device.
  • Device parameters XMAX= and YMAX= determine the size of the display area for a device. For a monitor the display area is the same as the graphics output area. For a hardcopy device, such as graphics printers and plotters, HSIZE= and VSIZE= define a smaller area, so a margin is possible.
  • The user can change the size of the graphics output area by specifying new values for HSIZE=, VSIZE= in a GOPTIONS statement or other SAS/GRAPH procedure statements. For a monitor display device HSIZE=, VSIZE= are set to zero be- cause the entire area of a graphics window is used to display the graphics output.
  • Device Resolution is the number of pixels/inch defined for a particular device, in both vertical and horizontal directions. For e.g., the PSCOLOR device driver setting defines the x- resolution to be 300 pixels/inch (or 300 dpi for dots per inch) i.e. 3300 pixels/ 11. 00 inches. Changing HSIZE=, VSIZE= will not affect the resolution.
  • Cells control the size of graphic elements i.e., TITLEs, SYM- BOLs, LABELs etc. The size of a cell is defined by the the set- tings for device parameters (LROWS=, LCOLS= ) for landscape mode, and (PROWS=, PCOLS= ) for portrait mode. These settings are usually overridden by HPOS= (which overrides LCOLS=, PCOLS= ) and VPOS= (which overrides PROWS=, LROWS=) in the GOPTIONS statement. (Thus changing HPOS=, VPOS= changes the cell size.)
  • By default SAS/GRAPH uses units in CELL size to draw graphic elements. For e.g., character heights for TITLE1 are two CELL units. Since changing cell size will affect the appearance of graphic elements, absolute units like IN or CM may be used.
  • Graphic elements are placed in the graphic output area as shown in Figure 2.

Graphic Output Area

vsize=8.5 in

6

?

^ hsize=7.5 in^ -

^ xmax=10.0 in^ -

ymax=11.0 in

6

?

 (^) Graphics Output Area

Placement of Graphic Elements

 (^) Graphics Output Area

 (^) Output of SAS/GRAPH p

^  

Titles appear here (by default)

A A

AKA Footnotes appear here (by default)

PROC GPLOT < data=> < gout=> < annotate=> ;

PLOT plot-request(s) ... / AXIS statement SYMBOLstatement PATTERNstatement TITLE statement FOOTNOTE statement NOTE statement BY statement

PLOT statement options:

vaxis=value-list vminor=n haxis=value-list hminor=n vm=n hm=n vaxis=axis-definition haxis=axis-definition overlay nolegend noaxes legend=legend-definition areas=n frame cframe=colorcaxis=color ctext=color fr cfr=color ca=color ct=color annotate=data-set-name anno=data-set-name href=value-list chref=color lhref=line-type ch=color lh=line-type vref=value-list cvref=color lvref=line-type cv=color lv=line-type

TITLEn <text-string> <text-string>... ; FOOTNOTEn <text-string> <text-string>; NOTEn <text-string> <text-string>... ;

color= specify color for the text string that follows; red, c= blue, green, black, violet, etc. or SAS colors like lightpink, mistyrose, or steelblue. Default: first color in colors list or first default color for device font= specify font for the text string that follows; swiss, f= triplex, greek, math, italic etc. Default: complex for title1 and none for all other text. Spec- ifying none causes the default hardware font for the output device to be used height= text height specified as n in, n cm, n pct, n cells, or n h= with units unspecified. Default: the unit specified in gunit= in goptions or cells justify alignment of text string l, r, or, c, for left-, right-, j= or center-justify Default: c angle= angle in degrees displayed in the range -90 to 90 a= move= (x, y) co-ordinates of starting location of text string, m= specified using units, as in h= e.g., (1,2) in, ( cm, 3 pct); can be specified as relative co-ordinates, (±x, ±y), starting from the end of last text line drawn in the current statement. lspace= line space; space above a title or below footnotes to be ls= left blank; specified using units as in h= underlin=underline text string; 0, 1, 2, or, 3 specifies thickness of line. u= box= draw box around text string 1, 2, 3, or, 4 specifies thickness of line.

SYMBOLn options ;

color= color for symbols, lines, CL lines, outlines c= ci= color for lines co= color for CL lines, staffs, bars, and outlines cv= color for symbols value= text string, special symbol, or none to specify plot symbol v= Setting for value depends on the choice of font font= specifies the font for the plot symbol. See below for details. f= height= height of plot symbol, in units as described for the title statement h= width= thickness of interpolated lines in units of 1. Default is 1. w= repeat= number of times symbol statement is to be re-used. r= line= line option from line option table. l= interpol= type of interpolation of plot points. Various settings for this parameter and their options are summarized in Table below i=

interpolate= (type of interpolation of plot points) i= none unconnected points join connected in order of occurrence box box-plots box h fill j join medians t tops & bottoms hilo vertical line connecting min to max hilo b bar j join means t tops & bottoms bj tj r

PROC GCHART < data=> < gout=> < annotate=> ;

HBAR chart variable(s) / VBAR chart variable(s) / BLOCK chart variable(s) / PIE chart variable(s) / STAR chart variable(s)/ AXIS statement PATTERNstatement TITLE statement FOOTNOTE statement NOTE statement BY statement

Options for HBAR include:

ascending descending noheading nolegend freq cfreq percent cpercent mean sum nostats axis=value-list raxis=value-list maxis=axis-definition axis=axis-definition raxis=axis-definition group=variable subgroup=variable sumvar=variable type=statistic discrete levels=number midpoints=value-list frame caxis=color ctext=color cframe=color coutline=color patternid=method legend=legend-definition name=quoted-string

PATTERNn options ;

color= color for the bar or subgroup; if color is not specified c= the pattern statement will be repeated for each color in the colors list value= pattern for the bar/block, map/plot or pie/star as described in the text v= repeat= number of times same pattern statement is to be reused r=

Character set for the Greek font

Line types for style= and line= options

Character set for the Math font

Character set for the special font

A subset of special symbols for plotting points

Plot Plot value= Symbol value= Symbol plus + hash # x × point · star ∗ dot • square 2 circle ◦ diamond 3 - (i.e.,hyphen) triangle 4 + (i.e.,plus) ⊕

Set value= option exactly as shown and omit the font specification