From: Seb on
Hi all,

I'm trying to create a heatmap chart. I found an example in the help
but I'm now struggeling to change the colors in the graph. I already
found some proc template style examples here in the group, but
connecting the Graph and the style is not working at the moment. could
anyone help me. (I copied the code below.)

Seb



ods path work.templat(update) sasuser.templat(update)
sashelp.tmplmst(read);
ods path (prepend) work.templat(update);
proc template;
define style MyStatistical;
parent = styles.statistical;
replace GraphColors /
'gdata' = cx000000
'gcdata' = cx000000
'goutlier' = cxB9CFE7
'gcoutlier' = cx000000
'gfit' = cx544838
'gcfit' = cx544838
'gconfidence' = cxE3C58A
'gcconfidence' = cxBA9C65
'gpredict' = cx6C5F4C
'gcpredict' = cx6C5F4C
'gpredictlim' = cxFAE2B3
'gcpredictlim' = cxFAE2B3
'gerror' = cx9C721C
'gcerror' = cxD5A64E
'ginsetheader' = colors('docbg')
'ginset' = cxFFFFFF
'greferencelines' = cxCDCDCD
'gheader' = colors('docbg')

'gconramp3cend' = cxFF0000
'gconramp3cneutral' = cxFFFFFF
'gconramp3cstart' = cx008000

'gramp3cend' = cxFF0000
'gramp3cneutral' = cxFFFFFF
'gramp3cstart' = cx008000


'gconramp2cend' = cx6497EB
'gconramp2cstart' = cxFFFFFF
'gramp2cend' = cxB87F32
'gramp2cstart' = cxFFFFFF
'gtext' = cx000000
'glabel' = cx000000
'gborderlines' = cx000000
'goutlines' = cx000000
'ggrid' = cxA0A0A0
'gaxis' = cx000000
'gshadow' = cx000000
'glegend' = cxFFFFFF
'gfloor' = cxFFFFFF
'gwalls' = cxFFFFFF
'gcdata12' = cxF7AC4E
'gcdata11' = cxB38EF3
'gcdata10' = cx47A82A
'gcdata9' = cxC08A13
'gcdata8' = cx2597FA
'gcdata7' = cxB26084
'gcdata6' = cx7F8E1F
'gcdata5' = cx9D3CDB
'gcdata4' = cxC1161C
'gcdata3' = cx426952
'gcdata2' = cx763810
'gcdata1' = cx2A25D9
'gdata12' = cx7F5934
'gdata11' = cxC8573C
'gdata10' = cx679920
'gdata9' = cx5E528B
'gdata8' = cxD6C66E
'gdata7' = cxB87F32
'gdata6' = cx6F7500
'gdata5' = cx8AA4C9
'gdata4' = cxFDC861
'gdata3' = cx98341C
'gdata2' = cx8DA642
'gdata1' = cx6173A9
'gcfit2' = cxB26084
'gfit2' = cxB26084
'gcconfidence2' = cxB26084
'gconfidence2' = cxB26084
'gblock' = cxB26084
'gablock' = cxB26084
'gccontrollim' = cxB26084
'gcontrollim' = cxB26084
'gcruntest' = cxB26084
'gruntest' = cxB26084
'gcstars' = cxB26084
'gstars' = cxB26084
'gcclipping' = cxB26084
'gclipping' = cxB26084
;end;
run;quit;

proc template;
define statgraph heatmap2;
begingraph / border = false designheight=502 designwidth=565;
entrytitle "weight - height";
layout overlay /wallcolor=lightgrey walldisplay=none;
scatterplot y=age x=height /
markercolorgradient=weight
colormodel=ThreeColorRamp
reversecolormodel=true
datalabel=weight
datalabelattrs=(color=black)
markerattrs=(symbol=squarefilled size=65)
name='color';
continuouslegend 'color'/ title="weight";
endlayout;
endgraph;
end;
run;

proc template;
list / store= heatmap2;
run;

ods style=MyStatistical;

proc sgrender data=sashelp.class template=heatmap2;