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?
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.
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.
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.
@RW9, I agree completely 😉
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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.