我在SAS中使用模板和sgrender创建基于不同类变量的热图。我希望输出能够根据类变量每次更新标题到什么类变量的值。到目前为止,我的代码是这样的(它打印,如果我告诉它为一个字符串冠军,但我不能得到它取决于变量会发生变化):将标题添加到SAS输出图
proc template;
define statgraph heatmapparm;
begingraph;
entrytitle 'INSERT TITLE HERE'; *Update title here based on classVar;
layout overlay;
heatmapparm x=magX2 y=magZ2 colorresponse=percent/colormodel=(blue yellow red)
name="heatmapparm" xbinaxis=false ybinaxis=false datatransparency=0;
continuouslegend "heatmapparm"/location=outside valign=bottom;
endlayout;
endgraph;
end;
run;
title #byval(classVar);
proc sgrender data=dataSet template=heatmapparm;
by classVar;
run;
谢谢大家!
查看proc模板的动态变量部分以及条目标题。 – Reeza 2014-12-06 00:20:35