Hello everyone, I would like to change the text size of a specific values in yaxistable in a PROC SGPLOT. To do this, I wanted to use an attribute map with the dattrmap option by modifying the textsize based on an index ("id"). However, the textsize option does not seem to work. Is it not available for an attribute map ? How can I achieve this ? Here is the reproductible code : data test;
input study :$30. n HR min max;
datalines;
study1 1 2.33 1.8 3.01
study2 2 1.72 1.33 2.22
study3 3 2.88 2.31 3.59
study4 4 1.9 1.55 2.33
study5 5 1.43 0.9 2.27
study6 6 1.63 1.29 2.06
study7 7 1.96 0.85 4.28
study8 8 1.46 1.13 1.88
study9 9 0.83 0.52 1.32
study10 10 1.56 0.87 2.79
study11 11 2.01 1.62 2.49
;
run;
data test;
set test;
if n in (1, 5, 8) then id=1;
else if n in (4, 10) then id=2;
else id=3;
run;
data attrmap;
length textweight $10;
id='text'; value='1'; textcolor='Black'; textsize=8; textweight='bold'; textstyle='normal'; output;
id='text'; value='2'; textcolor='Black'; textsize=7; textweight='normal'; textstyle='italic'; output;
id='text'; value='3'; textcolor='Red'; textsize=4; textweight='normal'; textstyle='normal'; output;
run;
title;
ods graphics / height=5in width=6in;
proc sgplot data=test dattrmap=attrmap noautolegend;
styleattrs axisextent=data;
highlow y=n low=MIN high=MAX / lineattrs=(color=black);
scatter y=n x=HR / markerattrs=(symbol=squarefilled color=black);
scatter y=n x=HR / markerattrs=(size=0) x2axis;
refline 1 / axis=x;
yaxistable study / nolabel location=inside position=left textgroup=id textgroupid=text;
yaxis reverse display=none colorbands=odd colorbandsattrs=(transparency=1) offsetmin=0.02;
xaxis display=(nolabel) VALUEATTRS=(size=8pt);
x2axis display=(nolabel noline noticks novalues);
run; Thank you for your help Guillaume
... View more