turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- Displaying N=xx below boxplot

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-09-2017 11:09 AM

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to bian123

01-09-2017 11:12 AM

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