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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -