Title: Effective Data Visualization with SASGRAPH
1Effective Data Visualization with SAS/GRAPH
2SAS/GRAPH Resources
- SAS Documentation
- SAS Samples and FAQ on support.sas.com
- SAS-L
- SGF(SUGI) and Regional SUG papers at
www.lexjansen.com - www.sascommunity.org
-
3Keys to SAS/GRAPH
- GOPTIONS Statement
- File output
- Graphic Devices
- SYMBOL Statement
- Everything about the data series
- AXIS Statement
- Everything about the axes
- File Output
- Graphic Devices
- Annotate Datasets
- Everything else
4proc gplot datasashelp.air plot
airdate runquit
5symbol1 colorblue valuedot height0.5
6symbol1 colorblue valuedot height0.5
interpoljoin
7symbol1 colorblue valuedot height0.5
interpolrlcli95
8symbol1 colorblue valuedot height0.5
interpolrQclm95
9More Symbol Statement Functionality
- Step plots
- Comparative Box plots
- Hi-low plots
- STD plots
10axis1 value(angle45 h0.75) minornone axis2
label(angle90) proc gplot datasashelp.air p
lot airdate /haxisaxis1 vaxisaxis2 runquit
11proc gplot datasashelp.air plot airdate
/haxisaxis1 vaxisaxis2 href400
vref01jan1959d chrefred cvrefgreen
12proc gplot datasashelp.air plot airdate
/haxisaxis1 vaxisaxis2 grid lhref1
lvref1 chrefbwh cvrefbwh
13goptions ftext'Tahoma' htext2
14You may need to sort by your x axis if you join
or spline.
15What next
- Ok, so I see that there is a lot within SAS/GRAPH
that I need to explore, but how do I make my
existing graphs look really good? - File Output
- Graphic Devices
- Make em BIG
- Consider using LaTeX
16Output to File
Copy/paste into MS Office from SAS Graph Window
can have unexpected results
- filename outgraph c\graphs\myGraph.wmf"
- goptions
- resetall
- devicewmf
- gsfnameoutgraph
-
-
17Graphic Devices
- Graphic Devicesgraph output formats
- Vector (EMF,WMF PDF)
- Drawn from instructions
- Looks good
- Raster (JPEG, GIF, PNG)
- Smoothed image
- Dithering
- Bitmap
18(No Transcript)
19GPLOVRL1
20Resolution
- Graphs produced small tend to have bad
resolution. - The default is small
- Conclusion Make em Big!
21GOPTIONS for WMF _at_ 4x
- filename outgraph c\graphs\myGraph.wmf"
goptions resetall devicewmf gsfnameoutgraph
xpixels2880 - ypixels1920
- gunitpct
- border
- cbackwhite
- colors(black blue green red)
- ftextswiss
- ftitleswissb
- htitle6
- htext4
22WMF Scaled 4x
23Adjustments
- symbol1 valuedot colorred interpoljoin
height3 - symbol2 fontmarker valueC colorblue
interpoljoin height2 - axis1 order(1955 to 1995 by 5) offset(2,2)
labelnone major(height4) minor(h
eight1)
width3 - axis2 order(0 to 6000 by 1000) offset(0,0)
- labelnone
- major(height4)
- minor(height1)
- width3
-
24WMF Scaled 4x Adjusted
25SAS Marker Font
symbol1 fontmarker valueC colorblue
26WMF TrueType Fonts
- proc fontreg modeall MSGLEVELVERBOSE
- fontpath 'c\windows\fonts'
- run
Tahoma Arial Courier New Helvetica Comic Sans MS
27Tahoma
28Courier
29Arial
30Verdana
31Comic Sans MS
32TrueType Fonts
- NOTE The font Minya Nouvelle (Style Regular,
Weight Normal) has been replaced in the SAS
Registry at - CORE\PRINTING\FREETYPE\FONTS\ltttfgt Minya
Nouvelle. Since it is a TRUETYPE font, it must
be referenced as ltttfgt Minya - Nouvelle in SAS. The font resides in file
c\windows\fonts\MINYN___.TTF. So use ltttfgt Minya
Nouvelle - The way that these interact with SAS can be
different. We will see in 9.2
33(No Transcript)
34(No Transcript)
35(No Transcript)
36(No Transcript)
37G3D Procedure
38G3D Procedure WMF
39GCONTOUR
40GCONTOUR
41SAS/GRAPH Resources
- SAS Documentation
- SAS Samples and FAQ on support.sas.com
- SAS-L
- SGF(SUGI) and Regional SUG papers at
www.lexjansen.com - www.sascommunity.org
-
42PDFC and LaTeXExample