Data visualization with SAS programming

Which type of graphic is appropriate?

Reply
Contributor
Posts: 39

Which type of graphic is appropriate?

I have a category in my x axis and I am unsure what type of graph would be most appropriate. My Y axis would be a count per year. I only end up with 8 "per year categories". They are in fractions like 0.25, 0.50, 0.75, 1, 1.5, etc. I have 200 patients. What would be the best way to depict this?

Esteemed Advisor
Esteemed Advisor
Posts: 7,232

Re: Which type of graphic is appropriate?

As far as I can tell, there is no "best" way to display the data, this is entirely up to the person/people who want to review this.  Not sure how we can tell you what someone else may want.  Go back to the requestor and ask them.  Technically you could display it it a number of ways all equally good - line, bar, bubble, time series etc.

Valued Guide
Posts: 518

Re: Which type of graphic is appropriate?

I agree with @RW9, no "best way", but post some of your data in the form of a datastep, and you will get some suggestions.

Esteemed Advisor
Esteemed Advisor
Posts: 7,232

Re: Which type of graphic is appropriate?

Just to clarify @draycut, my point was that this is an aesthetic questioc based on a reviewers preference.  For instance person a might like a line graph, but reviewer b might like a bubble plot.  Its not possible for us as a technical Q&A to decide what some third parties preference would be.  That is for this poster and the reviewer to assess and agree.

Valued Guide
Posts: 518

Re: Which type of graphic is appropriate?

@RW9, I agree completely Smiley Wink

SAS Super FREQ
Posts: 1,081

Re: Which type of graphic is appropriate?

[ Edited ]

I agree with earlier comments about preferred graph.  Some things can be ruled in or out based on your use case.  If the data on the x-axis is linear, a series (line) plot can make sense.  If the x-axis is categorical, but it is really time and the values are placed in the correct scale on the x-axis, then also a line or series works as the slope of the line segments can be compared and have meaning.

 

If the x-axis is purely categorical, where each value is unrelated, or plotted without a linear scale (in your case the value 1.25 is missing), then a series or line should be avoided. Better to use a needle plot or dot plot or vbar.  Dot plot is normally used with categories on the y-axis (SGPLOT).

 

If the x-axis values are really a nice fraction of year, maybe you can display the values in months, as in 3, 6, 9, etc.  Beyond this, it is really up to you.

Ask a Question
Discussion stats
  • 5 replies
  • 118 views
  • 3 likes
  • 4 in conversation