Hi Marcia,

I'm Pulling my Hair out. The data for the variable lower prints just fine using d5.1 but the format doesn't seem to work for the datalabel in proc sgplot. Basically, I need to suppress all 0s unless there is only 1 zero in the decimal place - e.g. I need 11.0 but not 11.00. I can't use F5.1 because some values are .02 or .03. TIA Audrey

data eye.graph_parm;
informat lower d5.1;
format lower d5.1;
retain time_of_day upper lower pvalue;
set graph_final;by time_of_day trial;
if first.trial;*only need one row;
format upper 5.1;
rename trial = Trial;
label Trial = 'Trial';
Label pvalue = 'p-value';
Label upper = 'Upper';
Label lower = 'Lower';
if Trial = 5 then Trial = 4;
if Trial=4 and Time_of_Day = 3 then Lower = 0.03;
if Trial=4 and Time_of_Day = 4 then Lower = -0.02;
if Trial=4 and Time_of_Day = 1 then Lower = -0.5;
if Trial=4 and Time_of_Day = 2 then Lower = -0.5;
proc print;
run;

Title 'Predicted Mean IOP';
ods listing style=listing;
proc sgplot data=eye.graph_parm;
format lower d5.1;
vbarparm category= time_of_day response=Pred / group=Trial groupdisplay=cluster limitlower=Lower limitupper=Upper
limitattrs=(color=black) DATALABELPOS=TOP datalabel ;
yaxis max=14 min=.05 Label ='Predicted Mean IOP' values=(-1 0 to 14 by 2);;
xaxis label = ' ';
xaxistable pvalue / stat=mean location=inside position=top;
run;