Hi, I would like to know if it is possible to position REFLINE label outside of plot area in PROC SGPANEL. Based on SAS documentation it seems only possible in PROC SGPLOT, where labelloc option can be defined. See following example: /* create rudimentary dataset */
data have(drop=i);
call streaminit(123);
format Date date9.;
do i=0 to 24;
do Country=1 to 3;
do Category=1 to 4;
Date=intnx('month','31dec2020'd,i,'end');
n=rand('normal',100,5);
output;
end;
end;
end;
run;
/* SGPANEL with REFLINE labels inside the plot area */
ods graphics / width=600 height=300;
proc sgpanel data=have pctlevel=group;
panelby Country / columns=3;
vbar Date / response=n group=Category stat=percent;
colaxis type=time;
refline '30jun2021'd / axis=x label='REF 1' label;
refline '31dec2021'd / axis=x label='REF 2';
run;
/* SGPLOT with REFLINE labels outside the plot area */
proc sgplot data=have(where=(country=1)) pctlevel=group;
vbar Date / response=n group=Category stat=percent;
xaxis type=time;
refline '30jun2021'd / axis=x label='REF 1' labelloc=outside;
refline '31dec2021'd / axis=x label='REF 2' labelloc=outside;
run;
ods graphics / reset; P.S. of course, I can do loop and instead of PROC SGPANEL do multiple PROC SGPLOTs, but that is not my question. Thanks for any help, Richard
... View more