We’re smarter together. Learn from this collection of community knowledge and add your expertise.

TIP: How to ask a good question about graphing in SAS

by Community Manager on ‎01-16-2015 10:20 AM - edited on ‎10-05-2015 03:34 PM by Community Manager (745 Views)

It is gratifying to see so many people asking and answering good questions about visualizing data with SAS.  In many of the message threads, we noticed that there are multiple rounds of "back and forth" as respondents are trying to gather information to provide the best response.  Here are some tips that can lead to a faster, more accurate answer for your SAS graphing question.

 

Specify your SAS version

 

This is the #1 follow-up question on message threads: "which version of SAS are you running?"  It's especially important for ODS Graphics because these features have evolved significantly over the past several releases.  You can achieve almost any result in any of the versions, but many operations have become easier (with less syntax, more elegant approaches) in recent versions of SAS.  If you can state whether you're using SAS 9.1.3, SAS 9.2, SAS 9.3, or SAS 9.4, then the graphing experts on the community can provide a more specific and useful answer.

 

If you're not sure which version you're using, submit the following code in your SAS session (or SAS Enterprise Guide or whatever environment you're using):

 

%put &SYSVLONG;

 

This will yield an answer in the log, similar to this:

 

9.04.01M2P072314

 

You can specify the major version of SAS within your post, or as a tag that you add before you publish your question.  (Tip for adding a tag quickly: use the "hashtag" notation within the body of your question.  Type the # key and then the SAS version number, and you'll see suggested tags pop up that you can include.)

 

Provide an example of the graph result that you want

 

A picture is worth...well, you know the saying.  If you have seen the type of graph you want in a journal, web site, or another product, attach a picture to the message so the community can help to recreate it.  To add a picture, click the Insert Image button (the little camera icon) in the message editor to attach a file that you saved as JPEG or PNG or another common image format.

 

For visual inspiration, visit Sanjay's visual index to his Graphically Speaking blog topics.

 

Provide an example of your data

 

If the community can see the structure of your data -- variables with their types (character, numeric, date, etc) and example values -- then it will be easier to formulate an answer that you can apply right away.  Of course, you should not risk sharing sensitive data in this open community forum, but the more "metadata" information that you can supply, the better.

 

Specify any other constraints

 

Sometimes, you need to solve a problem in a certain way because of organizational rules or practices.  For example, if you know that your result must look good in PDF or that you are required to achieve the result using SAS/GRAPH (PROC GCHART or GPLOT), state that up front in your question.  This will give responders the information that they need to focus their answers accordingly.

 

See also

 

For more general guidelines/advice about asking questions see this helpful post by a fellow community member.

Comments
by SAS Employee RobertAllison_SAS
on ‎01-20-2015 11:49 AM

This is great advice - thanks for posting, Chris!

Your turn
Sign In!

Want to write an article? Sign in with your profile.