Susan Slaughter

Archive for the ‘ODS Graphics’ Category

A Little Advice: How to Be a Top SAS Programmer

In Everything, Little SAS Book Series, ODS Graphics, SAS on April 6, 2018 at 1:18 pm

Recently I was honored to be interviewed by Mamadou Dakouo for his company DataSteps.


I was asked three questions:

  • How did I learn SAS?
  • What advice do I have for someone who wants to become a “top SAS programmer?”
  • What is my favorite SAS procedure?

My answers were

  • In graduate school
  • Be a self-starter
  • PROC FORMAT (runner-up: PROC SGPLOT)

For the details you can watch the 6 minute video.

Now Starring Susan and Lora in “SGPLOT and SGPANEL Procedures”

In Everything, Little SAS Book Series, ODS Graphics, SAS, SAS Global Forum on May 29, 2015 at 10:14 am

SAS Global Forum logoODS Graphics is not exactly new.  It became production with SAS 9.2 back around 2008, and before then it existed in a pre-production form at least as early as 2003.  So you would think that by now everyone who uses SAS would be using ODS Graphics, but apparently this is not the case.

It has come to my attention that some long-time SAS users still use PROC CHART–not even PROC GCHART, but PROC CHART which was designed for line printers back in the 1970s and creates graphs using alphanumeric characters!  Here is an example of a bar chart created using PROC CHART:


There is no excuse for this (unless, of course, you are trying to create a hip, retro vibe).  ODS Graphics is easy to use and produces beautiful graphs.  Here is the same bar chart created using PROC SGPLOT:


Now, if you are one of those people who uses SAS/Graph and PROC GCHART, and you are able to get the results you want, then that’s great.  I would never tell a SAS/Graph user to switch to ODS Graphics.  But for most people SAS/Graph is just too hard to use.  That’s why the developers at SAS created ODS Graphics: for the rest of us.  Just to prove that PROC SGPLOT is not any harder than PROC CHART, here is the code I used to create the two preceding bar charts:

PROC CHART DATA = olympics;
VBAR Region / SUBGROUP = PopGroup;

PROC SGPLOT DATA = olympics;
VBAR Region / GROUP = PopGroup;

If you are one of those people who still hasn’t learned ODS Graphics (or if you are new to SAS and want to get off on the right foot), this is your big chance.  At the recent SAS Global Forum conference, Lora Delwiche and I presented our paper “Graphing Made Easy with SGPLOT and SGPANEL Procedures.”  You can view that presentation.  Give us 50 minutes of your time, and we will convince you that ODS Graphics is easy (and maybe even fun) to use.  We start with a general introduction so you understand how the SGPLOT and SGPANEL procedures fit into the larger world of ODS Graphics, then we show how to create different types of graphs and how to customize them.

To watch our presentation, click here.

To download a copy of our paper, click here.

A lot of other great presentations were recorded at SGF too.  To see the full list, click here.

Happy graphing!


Your Resume–Selling Yourself Using SAS

In Enterprise Guide, Everything, ODS Graphics, SAS, SAS Papers, Western Users of SAS Software on October 4, 2013 at 10:43 am

Now Appearing at Western Users of SAS Software 2013Here is another presentation to which I have contributed for the Western Users of SAS Software 2013 conference.

Your Resume–Selling Yourself Using SAS

I am honored to have served as a co-author with Rebecca Ottesen on this highly original paper.  This paper shows how to use your SAS skills to create a resume that is clever, unique, and effective.

Here is an excerpt:

Your resume should demonstrate strengths and skills, cite meaningful performance metrics, quantify contributions to the organization, and set you apart from the competition, all while being concise and staying to the point.  As a SAS user, it is likely that the skill set you would like to showcase involves programming and data analysis, so it seems perfectly natural that you should use these skills to create content for your resume.  A well thought out SAS graphic or table might be the perfect selling point to catch the attention of a hiring manager.

Here is an example of a graphic showing a timeline for work and academic experience:

Your Resume

If you are at the conference, I hope you will attend our presentation Wednesday November 13, 2013 2:30-2:50pm. If not, then you can download the paper here.

Highlights from SAS Global Forum 2013

In Everything, ODS Graphics, SAS, SAS Global Forum on May 15, 2013 at 8:31 pm

SGF2013logoI’ve already written about one highlight of SAS Global Forum 2013: the SAS Web Editor. Here are some more features that I think deserve mention. Please note that I make no claims about the comprehensiveness or completeness of this list.

SAS 9.4 and Enterprise Guide 6.1 are scheduled for release in June and bring some important new features.  Here are a few:

ODS POWERPOINT destination  The usefulness of this destination is obvious.  There will be two new styles designed specifically for PowerPoint: one with a white background and one with a black background.  You can use other styles too, but these new styles have the advantage of being fully compatible with the PowerPoint theme selector.  Any graphs you create using ODS Graphics will be embedded in this destination.

ODS LAYOUT  If I remember correctly, the first time I ever heard about the ODS LAYOUT statement was at SUGI 28 in 2003.  I don’t know why it has taken so long to move to production, but I’m glad it’s finally here. If you need custom reports that combine results from multiple procedures, then you will probably love ODS LAYOUT.

PROC ODSLIST and PROC ODSTEXT  These new procedures allow you to create bulleted lists and formatted blocks of text in reports. The content can be static or dynamic (based on a data set).

ODS Graphics  The SG procedures continue to mature.  When I attended Dan Heath’s super-demo on SG procedures, members of the audience repeatedly said “Oh, good, I need that.” New features include a SORT= option in SGPANEL, insets in SGPANEL, split characters for tick and axis labels, and PERCENT and MEDIAN options for STAT=.

Enterprise Guide  For a long time, one of the problems with Enterprise Guide was that it kept evolving so quickly that users felt like they had to learn it all over again with each release. EG users will be glad to know that EG 6.1 uses the same basic layout as EG 4.2 and 5.1.  Improvements in EG 6.1 include sticky notes and a log summary to help people who write code.  Developer Casey Smith said there will be better integration with the ODS Graphics Editor.  I am glad to hear that ODS Graphics is being supported in EG, and I would like to see this dramatically increased. EG users should have the best graphics that SAS can offer.

SGF is finally global  28 percent of attendees were from outside the US.  I have attended SGF and it’s predecessor SUGI for decades, and most of that time I didn’t see a single attendee from outside the US. It’s exciting to see SAS Global Forum living up to its name.

Finally, if you didn’t get to attend SGF (or even if you did) there were some great presentations that you should watch.  I know these have been mentioned by many other people, but they are surprisingly hard to find online. So here are the links:

Opening Session The Opening Session was informative and included an amazing performance by the dance troupe Les Ombres.

Roger Craig’s talk about how he used analytics to train to be a contestant on Jeopardy! was fascinating.

The Little SAS Book Fifth Edition

In Everything, Little SAS Book Series, ODS Graphics, Publishing, SAS on November 19, 2012 at 9:28 am

Cover of The Little SAS Book: A Primer, Fifth EditonFive editions is a lot!

If you had told me, back when we wrote the first edition, that some day we would write a fifth; I would have wondered how we could possibly find that much to say.  After all…it is supposed to be The Little SAS Book, isn’t it?

But those clever folk at SAS Institute are constantly hard at work dreaming up new and better ways of analyzing and visualizing data.  And some of those ways turn out to be so fundamental that they belong even in a little book about SAS.  That’s especially true of this edition.

SAS 9.3 introduced several fundamental changes.  So we rewrote the book to reflect these.  One of the new defaults is that output is rendered as HTML instead of text.  That meant that almost every section in the book needed to be updated to show the new default output.  And since text output still has its uses, we added a section on how to send output to the good old LISTING destination.

In addition, ODS Graphics has matured a lot since it was introduced with SAS 9.2.  It has new default behaviors, and is now part of Base SAS.  The fourth edition of our book included a few sections on the SG procedures (SG stands for Statistical Graphics), but these procedures have developed so much that we felt they now deserved their own chapter.

In addition, here and there we split sections in two or added new ones to expand on features that were only mentioned before.

Here’s a short list, in no particular order, of new or expanded topics in the fifth edition:

  • Linguistic sorting
  • Concatenating macro variables with other text
  • AGE argument for the YRDIF function for computing accurate ages
  • LISTING destination for text output
  • Graph legends and insets
  • Graph attributes such as lines and markers
  • Image properties such as DPI
  • Saving graphics output
  • Many new graph options such as NBINS= for bar charts

Along the way, we removed topics or sections that had begun to feel dated or out of place.  For example, we took out the appendix on Coming to SAS from SPSS because it is now available as a free download that is both better and more complete.

So even though we have added a lot to this edition, it is still a little book.  In fact, this edition is shorter than the last—by one whole page!

To order a copy of this book, or view the table of contents or a sample of the book, visit the SAS Press web site.

Highlights of SGF 2011

In Everything, ODS Graphics, Publishing, SAS, SAS Global Forum on May 12, 2011 at 8:48 am

I’ve been so busy over the last month that I am just now getting a chance to sort through my notes from SAS Global Forum 2011.  Here are a few highlights I found:

SAS OnDemand for Academics

SAS OnDemand for Academics (the cloud computing version of SAS) will be free for academic research starting in Fall of 2011.  This is exciting news!  I’m surprised it didn’t get a lot more attention at the conference.  Since Fall 2010, SAS OnDemand for Academics has been free for use by students enrolled in courses that use SAS.  However, the number of professors and students doing research is far greater than the number of students enrolled in courses that use SAS.  In addition, professors now have more reason to teach SAS because students will be able to use it after the class is over.  This change will help SAS to compete with R since the main reason that R is so popular is because it is free, but SAS Institute will need to work hard to get the word out.

New output in SAS 9.3

SAS 9.3—which is expected to be released this summer—will bring major enhancements to output.  For the first time ever, text output (AKA listing) will no longer be the default.  HTML will become the default destination for output in Display Manager, and a new default style template, HTMLBlue, will make our output pretty.  Of course, you will still be able to turn on text output for those times when you need vanilla instead of mocha-almond-fudge.

ODS Graphics will be part of Base SAS starting with SAS 9.3

ODS Graphics (which became production with SAS 9.2) continues to grow in both features and popularity.  In SAS 9.2 you need a SAS/GRAPH license to use ODS Graphics, but starting with SAS 9.3 it will be part of Base SAS.  This is good news because it will make sophisticated graphs available to all users of SAS/STAT regardless of whether they have a SAS/GRAPH license.  This should also help SAS to compete with R since the second most common reason that people use R is because it produces graphics. (Of course, traditional SAS/GRAPH still does a lot of things that ODS Graphics doesn’t, and you will still need a SAS/GRAPH license to use traditional SAS/GRAPH.)

ODS Graphics will be on by default in SAS 9.3 in Display Manager

One of the problems with ODS Graphics in SAS 9.2 is that you need to turn it on.  Many of the people who need it most (occasional statistical users) never learned about it and therefore never turned it on.  SAS 9.3 will fix this problem by producing graphs for statistical procedures automatically.  This applies only to statistical procedures run in Display Manager; for jobs run in batch, ODS Graphics will still be off by default.

New features in ODS Graphics

In addition to becoming part of Base SAS and being on by default, ODS Graphics will deliver many new features in SAS 9.3.  Here are a few of the ones that I’m excited about: bin control on histograms, side-by-side bar charts, ability to control the order of groups, grouped box plots, interval box plots, ability to produce bar charts from pre-summarized data, ability to draw a line using slope-intercept values, and even pie charts—because corporations still produce annual reports despite Stephen Few’s quixotic ranting against them.

New ODS Graphics documentation

One highlight of SGF was something I didn’t see.  SAS developers Sanjay Matange and Dan Heath have written a book about SG procedures.  A pre-production draft of his book was on display in the Demo Room, but I didn’t get to see it because both copies of the book were stolen!  Julie Platt, Editor-in-Chief for SAS Press, told me that this is the first time a pre-production draft has ever been stolen.  The fact that someone or some people couldn’t wait a few months for the book to be published says something about how eager people are to use SG procedures.

Enterprise Guide 5.1

Enterprise Guide 5.1 which is scheduled for release toward the end of this year (after SAS 9.3, not at the same time) uses the same basic layout and menus as EG 4.2 and 4.3. This is good news. Early versions of EG evolved so rapidly, that users were forced to learn an entirely new interface with each new release.  Starting with EG 4.2, the interface has stabilized. It means that this is a good time to learn EG.  If you’ve been waiting on the sidelines wondering when to jump in, it’s time to get your swimsuit.

Las Vegas

I admit I was sceptical about Las Vegas as a location for SGF, but the city of “Lost Wages” turned out to be a fun and classy location for a gathering of SASites (despite the irony of a bunch of statisticians meeting in a gambling capital). I would not be surprised to see SGF return to Las Vegas again.

Semicolon People: The Video

Here we see the real reason why people attend SGF—because it’s so much darn fun.  If you missed it at the conference (as I did), it’s not too late to see the video produced by Greg Nelson and Neil Howard.  Will  next year bring a “Return of the Semicolon People” video?

Highlights of SAS Global Forum

In Enterprise Guide, Everything, Little SAS Book Series, ODS Graphics, SAS, SAS Global Forum on April 19, 2010 at 8:38 am

I just returned from Seattle where I had the pleasure of attending SAS Global Forum 2010.  It felt like a three day whirlwind of presentations and demos shared with 3,000 of my closest friends.  Frankly, there was so much going on that much of what happened already seems like a blur, but here are a few points I want to be sure to remember.

SAS OnDemand

The OMG moment during the Opening Session was the announcement that SAS OnDemand for Academics (the cloud computing version of SAS software) will be free to students and faculty for the teaching of courses starting this fall.  Everyone I talked to agreed that this is a brilliant move on the part of SAS Institute.  This will put SAS in a better position to compete with R, and will train much-needed new SAS professionals.

ODS Graphics

I’ve been excited about ODS Graphics since the last time SGF met in Seattle. That was 2003, and we had just finished writing the third edition of The Little SAS Book.  There in the Demo Room was Bob Rodriguez (the head of statistical development at SAS Institute) standing next to a big poster full of beautiful graphs and I thought, “Arrrggg, now we’re going to have to write a fourth edition!”  At SGF in 2009, there were only a few papers on ODS Graphics and as far as I know Lora Delwiche and I were the only people outside of SAS Institute to present anything on the topic.  This year there was an explosion of interest in ODS Graphics with lots of presentations by both SAS developers and SAS users.

SG Designer, a point-and-click application for building custom reusable graphs, is still experimental, but hugely promising. You can try SG Designer by submitting this statement in Display Manager.


The word is that SG Designer will be available in Enterprise Guide which should add a ton of functionality and sophistication to EG’s graphics capabilities.

Graph Template Language is a surprisingly accessible way to create graphs for folks who need features the SG procedures don’t provide.  Meanwhile, more and more features are being added to the SG procedures.

When we first started writing about ODS Graphics three years ago, Bob Rodriguez told us that ODS Graphics would never do everything that traditional SAS/GRAPH does and would therefore never replace it. As more and more features are added to ODS Graphics, that assertion is beginning to look iffy.  Some of the features being added are maps, pie charts, and a feature similar to annotation.  (People disparage pie charts, but whether you like them or not, they are a fact of life.)  It’s easy to see why people who avoided traditional SAS/GRAPH and its complexity would be attracted to ODS Graphics, but I was struck by the fact that a lot of users of traditional SAS/GRAPH are now looking at ODS Graphics too.  I once told an SPSS user that SAS/GRAPH is “incredibly flexible, incredibly powerful, incredibly hard to use.”  That’s not true any more (still flexible and powerful, but no longer hard to use).  It sounds melodramatic, but I really believe that ODS Graphics will save graphics in SAS.

Enterprise Guide 4.3

EG 4.3 looks like EG 4.2, but includes fabulous new features for SAS programmers.  These include syntax suggestion and autocompletion to help you write SAS programs, a code analyzer to read your program and turn it into a process flow, and a new autoexec process flow which will run automatically every time you open a project.

The Little SAS Book for Enterprise Guide 4.2

This may not have been a highlight for most attendees, but seeing our newest book in print for the first time was definitely a highlight for me.  My own copies arrived after the conference so the people who bought copies there scooped the authors.

SAS Global 2013

In 2013 SGF will return to  San Francisco! This is a very big deal for SAS users in my area especially since many are government employees and cannot travel outside of California.  If I remember properly, the last time this conference was held in San Francisco a record was set for attendance so coming back is a great idea.

VOX Audio

The last item on my list is the musical group that entertained us all at the end of the Opening Session.  I thought these five incredibly talented people fit right in at SGF because while most SAS users aren’t much for singing (judging from the rather pathetic audience participation), SAS users are clever and innovative. Those words also describe VOX Audio. If you didn’t get to hear them, then click here for a sample.

Missed the conference?

If you missed the conference, you can still learn a lot by reading the papers.  My favorite place to find SAS conference papers is Lex Jansen’s site.  I saw Lex at the conference, but didn’t get to talk to him.  Oh well, next time….

Appearing Soon at SAS Global Forum

In Everything, Little SAS Book Series, ODS Graphics, SAS, SAS Global Forum, SAS Papers on April 8, 2010 at 2:28 pm

In just a few days I will fly to Seattle for SAS users’ biggest event of the year: SAS Global Fourm, April 11-14, in Seattle, WA. I hope to see you there.

If you are a fan of SAS Press, then be sure to visit the Pubs booth in the Demo Room Monday from 6:00-7:30 pm. That’s when SAS Press will host the Authors’ Reception and Book Drawing Mixer. The drawing will feature one book by every published author in attendance. So come on by to meet lots of authors and test your luck.

I just learned that you must register for the book drawing by 6:15 to have a chance to win, and, of course, you must also be present to win. The drawing proper will start promptly at 6:30 and will be over by 6:45!

Then on Tuesday in the highly-coveted 8:00-9:20 am time slot, Lora Delwiche and I will present Using PROC SGPLOT for Quick High-Quality Graphs , in the Hands-on Workshop section, Room 6C. I am enormously grateful that the Kick Back Party is Tuesday night, not Monday! If you are an early riser, then why not join us?

Can’t make it to Seattle? Here are the links for our paper, handouts, data sets.

Using PROC SGPLOT to Create Quick High-Quality Graphs: The Paper One of the great new features in SAS 9.2 is ODS Graphics which includes the SGPLOT procedure. This paper includes both an introduction to PROC SGPLOT, and a concise reference of syntax that you may want to keep on your desk whenever you write PROC SGPLOT code. Other topics covered are PROC SGPANEL, options for controlling and accessing individual graphs, and the ODS Graphics Editor.

Using PROC SGPLOT to Create High-Quality Graphs: The Handout This is the handout for the hands-on part of the workshop. Follow the step-by-step instructions for an introduction to PROC SGPLOT, PROC SGPANEL, and the ODS Graphics Editor. (Note that you also need the data sets available below.)

Using PROC SGPLOT to Create Quick High-Quality Graphs: The Data This zipped file contains the SAS data sets used in the paper and hands-on workshop. Using these data, you can run the examples yourself.

Quick Reference Tables for PROC SGPLOT This file contains tables summarizing the rather extensive syntax for PROC SGPLOT. These tables are a good tool for learning PROC SGPLOT, and also a handy reference. These are the same syntax tables that appear in the paper listed above but are in grayscale instead of color.

Review of The Little SAS Book: A Primer

In Everything, Little SAS Book Series, ODS Graphics, SAS on February 12, 2010 at 3:09 pm

I just found out about a new review of The Little SAS Book: A Primer, Fourth Edition. This unsolicited review appears on page 7 of the Winter 2010 issue of The Missing Semicolon published by Systems Seminar Consultants, a SAS training and consulting company based in Madison, WI.

Click here to read the review.