proc template;
define statgraph heatmapparm;
begingraph;
layout overlay/xaxisopts=(linearopts=(viewmin=50 viewmax=80));
heatmapparm x=height y=weight colorresponse=count /
name="heatmapparm" xbinaxis=false ybinaxis=false;
continuouslegend "heatmapparm" / location=outside valign=bottom;
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.gridded template=heatmapparm;
run;
Hello @whymath,
With your sample data it helps to avoid specifying VIEWMIN/VIEWMAX values outside the data range and instead to set THRESHOLDMIN, THRESHOLDMAX, OFFSETMIN and OFFSETMAX to zero. The LINEEXTENT=DATA option seems to be redundant in this case, but could also be included.
layout overlay/xaxisopts=(linearopts=(thresholdmin=0 thresholdmax=0) offsetmin=0 offsetmax=0 /* lineextent=data */)
yaxisopts=(linearopts=(thresholdmin=0 thresholdmax=0) offsetmin=0 offsetmax=0 /* lineextent=data */);
Just by trying: You could define the collor for the wallcolor the same as for the minimum value in the colormodel.
proc template;
define statgraph heatmapparm;
begingraph;
layout overlay/xaxisopts=(linearopts=(viewmin=50 viewmax=80)) wallcolor=cx8097b2;
heatmapparm x=height y=weight colorresponse=count /
name="heatmapparm" xbinaxis=false ybinaxis=false
colormodel=(cx8097b2 White cxd05b5b)
;
continuouslegend "heatmapparm" / location=outside valign=bottom;
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.gridded template=heatmapparm;
run;
Hello @whymath,
With your sample data it helps to avoid specifying VIEWMIN/VIEWMAX values outside the data range and instead to set THRESHOLDMIN, THRESHOLDMAX, OFFSETMIN and OFFSETMAX to zero. The LINEEXTENT=DATA option seems to be redundant in this case, but could also be included.
layout overlay/xaxisopts=(linearopts=(thresholdmin=0 thresholdmax=0) offsetmin=0 offsetmax=0 /* lineextent=data */)
yaxisopts=(linearopts=(thresholdmin=0 thresholdmax=0) offsetmin=0 offsetmax=0 /* lineextent=data */);
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.