Data visualization with SAS programming

SGPlot datalabels format when clm option is on

Reply
Occasional Contributor
Posts: 19

SGPlot datalabels format when clm option is on

I have the following code:

 

proc sgplot data = &lib..&sasdsn ;
format amyloplastheight 7.1 ;
vbar treat / group=gt response=amyloplastheight stat=mean  dataskin=crisp
					limits=both limitstat=clm groupdisplay=cluster datalabel datalabelattrs=(size=6); 
yaxis label="amyloplastheight (^{unicode mu}m)" grid; 
keylegend /position =bottom title="genotype" sortorder=ascending;
run;

However, I cannot control the format of the lower and upper limits that are also displayed.

 

Thanks for any suggestions.

PROC Star
Posts: 1,190

Re: SGPlot datalabels format when clm option is on

Where do you want the confidence limits to appear?

 

Can you show us some sample data if you want a code answer?

Super User
Posts: 13,083

Re: SGPlot datalabels format when clm option is on

Also which version of SAS are you running. There have been significant additions to graphics option in each release for quite awhile. A solution that works for SAS 9.4m5 may not work for 9.4m4.

Occasional Contributor
Posts: 19

Re: SGPlot datalabels format when clm option is on

I can give you an example with a sashelp datastep:

 

ods html style = analysis ;
title font=Arial height=14pt 'barchart with 95% CL' ; 
proc sgplot data=sashelp.shoes;
format sales 8.2;
vbar region / response=sales stat=mean  dataskin=crisp
				   limits=both limitstat=clm groupdisplay=cluster 
                   datalabel datalabelattrs=(size=6); ;
run;
title;

In the bottom, the mean is displayed with format 8.2 as requested, however also the limits are displayed with another format. I did not particularly want the limits in the bottom, but if they are, they should have the same format.

I am using SAS 9.4 1M5

Ask a Question
Discussion stats
  • 3 replies
  • 80 views
  • 0 likes
  • 3 in conversation