BookmarkSubscribeRSS Feed
Baraso
Fluorite | Level 6

Hi, 

I use the code below to create a heatmap based on percentage of missing values for my variables in each year. it seems like there is a default range of colors (red and blue) which does not change at all. I changed the colors specified in rangecolormodel, but no change happens. Can you please help me to solve this. Thank you. 

 


proc template;
define statgraph heatmap;
begingraph / designheight=400 designwidth=1200 pad=1;
entrytitle 'Percentage of missing values 3mo carry forward, full FU';
rangeattrmap name="rmap";
range min - max / rangecolormodel=(white yellow);
endrangeattrmap;
rangeattrvar attrmap="rmap" var=Percentages_missing attrvar=pColor;
layout overlay / yaxisopts=(offsetmin=0.1 offsetmax=0.1 display=(ticks tickvalues line) tickvalueattrs=(size=6))
xaxisopts=(offsetmin=0.1 offsetmax=0.1 display=(ticks tickvalues line) tickvalueattrs=(size=6) discreteopts=(tickvaluefitpolicy=stagger));
heatmapparm x=year y=Variables colorresponse=Percentages_missing / name="heatmap";
scatterplot x=year y=Variables / markercharacter=Percentages_missing markercharacterattrs=(size=4);
continuouslegend "heatmap" / valueattrs=(size=6) ;
endlayout;
endgraph;
end;
run;

proc sgrender data=out_graph template=heatmap; run;

3 REPLIES 3
Baraso
Fluorite | Level 6

Thank you. Actually, I've already modified my codes several times for different options, but nothing happens. The default colour pattern do not change at all. 

 

SAS_Cares
SAS Employee

Are you still experiencing issues on this? If so, we would like to open a technical support track for you or you can work with technical support directly by emailing support@sas.com Read more about our technical support service including information needed to open a track here https://support.sas.com/en/technical-support/contact-sas.html

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 894 views
  • 0 likes
  • 2 in conversation