Are you at a graphics crossroads?

3

When we were out to dinner one night, with my daughter and her friend, Leanne, the girls were having a hard time deciding on their orders. Leanne joked that it was too hard to "tween bechoose" all the items on the menu. When I talk to some of my students about SAS/GRAPH versus ODS Graphics, I have the sense that they, too, are having a "tween bechoose" moment.

My colleague, Mike Kalt, and I wrote a SAS Global Forum paper about being at the graphics crossroads and deciding on the path between SAS/GRAPH and ODS Graphics. Our conclusion was that there were valid reasons to pick either path. But we also posed some questions you can ask yourself that will point to one direction or another. Here's a chart that summarizes the questions we address in our paper.

Question Notes
Do you have existing SAS/GRAPH code? If you have existing SAS/GRAPH code, then you already have an investment in SAS/GRAPH. You can develop new graphs using ODS Graphics and/or keep using SAS/GRAPH.
Do you need to use specialized procedures? GKPI, GRADAR, GCONTOUR, GMAP and G3D are part of SAS/GRAPH.Dot, vector, horizontal box plots, ellipse and distribution curves are easily produced with ODS GRAPHICS.
Do you need extensive customization of your images? Both SAS/GRAPH and ODS GRAPHICS allow customization of output using the ODS STYLE= option. In addition, both methods have other control options available.
Do you use point and click techniques or do you write code? Both SAS/GRAPH and ODS GRAPHICS allow you to point and click (EG Graph Tasks/Wizard or ODS GRAPHICS Designer) or write programs.
Do you need statistical graphs? Many statistical procedures will automatically produce graphs if you use ODS GRAPHICS ON and the PLOTS= option of the statistical procedure. However, SAS/GRAPH "G" procedure methods still work for generating data points and plotting the results.
Do you need to produce graphs in "small multiples" or paneled plots? PROC SGPANEL and PROC SGSCATTER produce paneled plots or "small multiples" easily.
SAS/GRAPH and PROC GREPLAY will also produce paneled graphs, but use more complex syntax.
Do you want multi-cell plots or scatterplot matrices? PROC SGSCATTER is designed to produce matrix plots. SAS/GRAPH and PROC GREPLAY can also be used, but not as easily.

The bottom line is that since ODS Graphics is included with your Base SAS license in SAS 9.3, you can now produce presentation quality graphs easily, even without a SAS/GRAPH license. If you are new to SAS or you only have Base SAS and SAS/STAT, then ODS Graphics would be your first choice for creating graphs.  If you need to produce maps or key performance indicators or some other specialized graphs, then SAS/GRAPH would be the best place to start.

Of course, you can go down one graphics path for a while and then switch to the other path. If you invest in learning about SAS style templates, you'll be able to control the overall look and feel of output on both paths. SAS Training offers courses on both methods of producing graphics output and SAS Press has books on both methods. Here are a few offerings to consider:

SAS/GRAPH Training
SAS Graph 1: Essentials
Producing Maps with SAS/GRAPH

SAS/GRAPH Books
Quick Results with SAS/GRAPH Software
Annotate: Simply the Basics
Maps Made Easy Using SAS
SAS/GRAPH Beyond the Basics
The How-to Book for SAS/GRAPH Software

ODS Graphics Training
Coming soon!

ODS Graphics Books
Statistical Graphics in SAS: An Introduction to the Graph Template Language and the Statistical Graphics Procedures
Statistical Graphics Procedures by Example: Effective Graphs Using SAS
Statistical Programming in SAS

Maybe it's not about choosing between the two graph methods. It could be about the best method for the immediate task at hand. Whether you choose ODS Graphics or SAS/GRAPH you have the power to produce great graphs.

Tags sas/graph
Share

About Author

Cynthia Zender

Cynthia Zender is an instructor and course developer at SAS Institute. With Lauren Haworth and Michele Burlew, she has co-authored the book "Output Delivery System: The Basics and Beyond."

3 Comments

  1. Pingback: Baseball's loss is your gain: The ODS Graphics course is here! - The SAS Training Post

  2. Hi,
    I am using the SOUNDEX function in SAS to count names.
    My data includes many hispanic names, so I would like to modify the code for the soundex function to
    include the letter H. I would like to group H with the # 3. so 3 would be assigned to D,T,H.
    Can someone kindly please send me the modified sas code for soundex that groups H into the # group.

    Currently, the soundex function uses this formula:
    1. B, P, F, V
    2. C, S, K, G, J, Q, X, Z
    3. D, T
    4. L
    5. M, N
    6. R

    Thanks,
    -rachel

Back to Top