BookmarkSubscribeRSS Feed
bian123
Calcite | Level 5

Hi,

 

I am producing boxplots using GTL, a boxplot statement and proc sgrender. I would like to be able to display the number of data points which contibute to each indivdual boxplot; right underneath the plot. So, for example, on one page I have 4 distinct x values, each with two boxplots (one for each value of the group variable). So all together 8 boxplots on a single page.

 

I have output the dataset that the boxplot statement produces and I can see that it contains the number of data points which contibute to each plot. So my question is, what is the easiest way to get this value underneath each plot? So in my example I would want 8 different N=xx values. I would also like these to be within the bound of the axis (in the wall space), so I cannot just add them in as x-axis labels.

 

Initial resarch pointed me towards using an annotation dataset to do this, but because these plots are to be repeated on various parameters, the positions of the annotations would have to be dynamically generated, due to the fact that not all paramaters will have the same number of plots on each page. So before I go down this road I thought I would look for suggestions on the most simple approach, as I have not used custom annotations before.

 

Thanks in advance

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Get your N numers in the data, the you simply overlay a scatter plot with values as the markerchar, follow this doc:

http://support.sas.com/resources/papers/proceedings12/085-2012.pdf

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1663 views
  • 0 likes
  • 2 in conversation