Data visualization with SAS programming

Display values on BoxPlot

Reply
Contributor sfo
Contributor
Posts: 66

Display values on BoxPlot

Hi,

 

I am using SAS 9.2 and looking for a solution where I can

 

1. display the values (as circles) on the box plot using proc boxplot or gplot. I am not confortable in sgplot.

 

2. some of the values may overlap, so is there a way to jitter them?

 

3. display summary stats (min, max, median and mean) on the graph (similar to inset) option.

 

Thanks

Super User
Posts: 11,118

Re: Display values on BoxPlot

Which values do want to display? Each observation? Outliers? Extreme Outliers only?

 

With GPLOT you can overlay a scatter plot over a box plot but anything resempling inset data requires annotate data sets.

 

I strongly recommend not arbitrarily removing optional solutions such as SGPLOT. Especially with the enhancements that have been added with the later releases the statistical graphing procedures are where new features are being added. For instance if you only want to display outliers then the SPREAD option provides some help with displaying identical values without the need for code to "jitter" responses.

Contributor sfo
Contributor
Posts: 66

Re: Display values on BoxPlot

I want to get all the values displayed.

 

I can explore SGPLOT option, but I heard there are limitations using the procedure on SAS 9.2?

 

Could you help me how to overlay all subjects in SGPLOT?

Super User
Posts: 11,118

Re: Display values on BoxPlot

I am not going to attempt to make up data that may not be a good match for your project. If you have some example data in a SAS dataset you can follow instructions from this link https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to convert it into datastep code that you could post here. The folks could attempt to create a solution with data to test.

 

Some issues may come into play such as what size display area you want to show the values in, how many values and how many categories are involved. If you have lots of values there may not be any practical way to fit them into a 2inch by 2inch display for example.

 

It is a good thing that you mention SAS 9.2 because there are lots of things that may have been suggested for later versions. Is your release 9.2.3 or later? There were a large number of changes made at that release.

Contributor sfo
Contributor
Posts: 66

Re: Display values on BoxPlot

It is 9.2

Ask a Question
Discussion stats
  • 4 replies
  • 225 views
  • 0 likes
  • 2 in conversation