BookmarkSubscribeRSS Feed
LucyB
Obsidian | Level 7

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?

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

PeterClemmensen
Tourmaline | Level 20

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Just to clarify @PeterClemmensen, 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.

PeterClemmensen
Tourmaline | Level 20

@RW9, I agree completely 😉

Jay54
Meteorite | Level 14

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 873 views
  • 3 likes
  • 4 in conversation