My dataset contains vitamin D intake from 4 different sources (bron) for 7 different subpopulations (a,b,c,d,e,f,g). Is it possible to create reference lines that do not cover the entire width of a graph but with a limited to the concerned category. proc format;
value formsubpop 1="a"
2="b"
3="c"
4="d"
5="e"
6="f"
7="g";
run;
proc sort data=VitD_aggr;
by subpop ;
run;
proc sgplot data=VitD_aggr;
vbox VitD_tot/category=subpop group=bron grouporder=descending boxwidth=0.9 NOOUTLIERS;
YAXIS LABEL = 'Usual vitamin D intake (ug/day)' GRID VALUES = (0 TO 50 BY 10);
xaxis display=(nolabel) ;
REFLINE 10 /label="AI=10 ug/day" lineattrs=(color=green);
REFLINE 25 /label="UL=25 ug/day" lineattrs=(color=red);
REFLINE 15 /label="AI=15 ug/day" lineattrs=(color=green);
REFLINE 50 / label="UL=50 ug/day" lineattrs=(color=red);
format subpop formsubpop. ;
keylegend / location =outside position =bottom across=1;
run;
... View more