Code trying to run, does not pickup the rangealtcolormodel colors.
proc template;
define statgraph ap01t;
begingraph / drawspace=datavalue;
* entrytitle "";
rangeattrmap name="densityrange" ;
range MISSING / rangealtcolor=gray ;
range MIN - MAX / rangealtcolormodel=(red orange yellow) ;
endrangeattrmap ;
rangeattrvar attrvar=rangevar var=ACT_CUST_OUT attrmap="densityrange";
layout overlayequated / equatetype=equate border=false
xaxisopts=(label=" " display=none)
yaxisopts=(label=" " display=none)
;
polygonplot x=X y=Y id=Shape / display=(fill)
COLORRESPONSE=rangevar
name="Shape"
;
polygonplot x=X y=Y id=Shape / display=(outline) OUTLINEATTRS=(color=black) group=Otln;
continuouslegend "Shape" / orient=vertical
location=outside valign=center halign=right
valuecounthint=10 title="Shape";
endlayout;
* entryfootnote halign=left "";
endgraph;
end;
run;
proc sgrender data=Shape template=ap01t;
run;
Since these are filled areas, use RANGECOLOR and RANGECOLORMODEL instead of use RANGEALTCOLOR and RANGEALTCOLORMODEL.
The answer is "Yes". Please attach full code with data to debug your case.
Had to generate some data since my data set has over 100,000 rows but this generated data set gives me the same result.
data Shape;
;
infile datalines delimiter='09'x dsd firstobs=1;
input Obs Otln id x y vrRng;
datalines;
1 1 1 0 0 10
2 1 1 20 0 10
3 1 1 20 30 10
4 1 1 0 30 10
5 1 1 0 0 10
6 1 2 30 0 5
7 1 2 50 0 5
8 1 2 40 30 5
9 1 2 30 0 5
10 1 3 60 0 15
11 1 3 80 5 15
12 1 3 80 15 15
13 1 3 70 30 15
14 1 3 60 30 15
15 1 3 60 0 15
16 1 4 30 40 25
17 1 4 50 40 25
18 1 4 40 70 25
19 1 4 30 40 25
20 1 5 0 50 10
21 1 5 20 50 10
22 1 5 20 80 10
23 1 5 0 80 10
24 1 5 0 50 10
25 1 3 60 50 .
26 1 3 80 55 .
27 1 3 80 65 .
28 1 3 70 80 .
29 1 3 60 80 .
30 1 3 60 50 .
;
Run;
proc template;
define statgraph Map01t;
begingraph / drawspace=datavalue;
* entrytitle "";
rangeattrmap name="densityrange" ;
range MISSING / rangealtcolor=gray ;
range MIN - MAX / rangealtcolormodel=(red orange yellow) ;
endrangeattrmap ;
rangeattrvar attrvar=rangevar var=vrRng attrmap="densityrange";
layout overlayequated / equatetype=equate border=false
xaxisopts=(label=" " display=none)
yaxisopts=(label=" " display=none)
;
polygonplot x=X y=Y id=id / display=(fill)
COLORRESPONSE=rangevar
name="Shape"
;
polygonplot x=X y=Y id=id / display=(outline) OUTLINEATTRS=(color=black) group=Otln;
continuouslegend "Shape" / orient=vertical
location=outside valign=center halign=right
valuecounthint=10 title="Shape";
endlayout;
* entryfootnote halign=left "";
endgraph;
end;
run;
proc sgrender data=Shape template=Map01t;
run;
Since these are filled areas, use RANGECOLOR and RANGECOLORMODEL instead of use RANGEALTCOLOR and RANGEALTCOLORMODEL.
Thanks that worked.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.