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

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1121 views
  • 0 likes
  • 2 in conversation