現在、フォレスト プロット (SAS 大学版) の sgplot コードを作成しています。必要に応じて正しいグラフを取得できましたが、特定の観測の色を変更することはできません。これは私のコードです
data my_data;
input study $ year rr lcl ucl;
datalines;
mickey 2015 1.5 0.7 2.3
minny 2010 1.2 1.0 1.4
donald 2013 0.8 0.2 1.4
daisy 2014 1.3 1.0 1.6
goofy 2017 1.9 0.9 2.9
pluto 2010 1.4 0.7 2.1
;
run;
proc sgplot data=my_data
noautolegend nocycleattrs;
scatter y=study x=rr/ markerattrs=(symbol=squarefilled size=12 color=black);
highlow high=ucl low=lcl y=study / type=line lineattrs=(color=black);
yaxistable study year / labelattrs=(family=arial size=12pt weight=bold) position=left location=inside valueattrs=(family=arial size=10pt);
yaxistable rr lcl ucl / labelattrs=(family=arial size=12pt weight=bold) position=right location=inside valueattrs=(family=arial size=10pt);
xaxis offsetmin=0.1 offsetmax=1 min=0.5 max=3.0 display=(nolabel);
yaxis offsetmin=0.1 offsetmax=0.1 display=none reverse;
refline 1 / axis=x;
styleattrs axisextent=data;
run;
私が達成しようとしているのは、観測番号 3 (donald、2013、0.8 0.2 1.4) を赤色 (マーカー属性だけでなく、プロット時のテキスト) に変更することです。
さまざまな sgplot 属性を確認しようとしましたが、プロット時に観測番号 3 のこの特定の色を変更できません (赤、他の観測は黒のままです)。テンプレートも見ましたが、これは役に立ちません。どうすればこれを達成できますか?