templates - Add Title To SAS Output Graphs -


i'm using template , sgrender in sas create heatmaps based on different class variable. i'd output update title based off of class variable each time value of class variable. far, code (it prints string title if tell to, can't vary depending on variable):

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;     classvar; run; 

thank all!

use macro variables alter titles. here example

%let classvar=variablevalue1;   title &classvar.; proc sgrender data=dataset template=heatmapparm;     &classvar.; run; 

you can write cleaner code putting proc sgrender code inside sas macro.


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -