<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do i create a Heat Map with Proc Template in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247691#M8991</link>
    <description>&lt;P&gt;I've written &lt;A href="http://blogs.sas.com/content/iml/tag/heat-maps" target="_self"&gt;quite a few blog posts about heat maps.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There's one about &lt;A href="http://blogs.sas.com/content/iml/2014/08/18/heat-map-in-sas.html" target="_self"&gt;how to create a basic heat map from GTL.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Search my blog for RANGEATTRMAP to see other examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2016 10:55:49 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-02-03T10:55:49Z</dc:date>
    <item>
      <title>How do i create a Heat Map with Proc Template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247648#M8987</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a relatively new SAS user using 9.4, so please excuse my naivety of SAS and its vernacular. I'm trying to make a Heat Map using Proc Template and I'm 99% of the way there. My data are in&amp;nbsp;a three-column table; the first two columns are X and Y values, while the third is a number between 0 and 6.&amp;nbsp;My current problem is the colorresponse bar at the right. It automatically scales itself so the minimum and maximum values are the minimum and maxima of my data, respectively. Instead, I'd like the minimum to be 0 and the maximum to be 20. I've included my template and&amp;nbsp;Proc Sgrender statements below in case those help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template; /* basic heat map with continuous color ramp */
define statgraph heatmap2;
dynamic _X _Y _Z _T; /* dynamic variables */
begingraph;
entrytitle _T; /* specify title at run time (optional) */
layout overlay;
heatmapparm x=_X y=_Y colorresponse=_Z / /* specify variables at run time */
name="heatmap" primary=true
COLORMODEL = (BLUE LIME GREEN RED)
xbinaxis=false ybinaxis=false;
range 0 - 20;
continuouslegend "heatmap";
endlayout;
endgraph;
end;
run;

proc sgrender data=H1A1RRF_heat template=Heatmap2; 
dynamic _X='X' _Y='Y' _Z='Recurrence' _T="RRRI - H1A1";
TITLE "RPt";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Feb 2016 02:38:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247648#M8987</guid>
      <dc:creator>benbuck</dc:creator>
      <dc:date>2016-02-03T02:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do i create a Heat Map with Proc Template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247649#M8988</link>
      <description>&lt;P&gt;What you need is the Range Attribute Map. &amp;nbsp;See the SAS documentation for GTL. &amp;nbsp;You can define the&amp;nbsp;colors to be used for various data ranges, and then associate the range attr map (using range attr var) to the response variable of the Heat Map.&lt;/P&gt;
&lt;P&gt;See &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2013/04/14/attributes-map-3-range-attribute-map/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2013/04/14/attributes-map-3-range-attribute-map/&lt;/A&gt;. &amp;nbsp;The link at the bottom of the article will provide you the full code.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 02:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247649#M8988</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-02-03T02:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do i create a Heat Map with Proc Template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247650#M8989</link>
      <description>&lt;P&gt;Thanks, I had seen this online, but wasn't sure if it worked for continuous variables, or just for discrete ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 02:45:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247650#M8989</guid>
      <dc:creator>benbuck</dc:creator>
      <dc:date>2016-02-03T02:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do i create a Heat Map with Proc Template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247656#M8990</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Got it! Thanks for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case it ever helps anyone, here is my updated code.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;proc template; &lt;BR /&gt;define statgraph Heatmap2;&lt;BR /&gt;dynamic _X _Y _Z _T;&lt;BR /&gt; begingraph;&lt;BR /&gt; dynamic _attr _title _x _y;&lt;BR /&gt; entrytitle _T;&lt;BR /&gt; entryfootnote halign=left 'H1A1 a';&lt;BR /&gt; rangeattrmap name='map';&lt;BR /&gt; range 0 -&amp;lt; 10 / rangecolormodel=(lightblue cxf7f7f7);&lt;BR /&gt; range 10 -&amp;lt; 15 / rangecolormodel=(cxf7f7f7 gold);&lt;BR /&gt; range 15 -&amp;lt; 20 / rangecolormodel=(gold red);&lt;BR /&gt; endrangeattrmap;&lt;BR /&gt; rangeattrvar attrvar=Recurrence var=Recurrence attrmap='map';&lt;BR /&gt; layout overlay / xaxisopts=(display=(ticks tickvalues))&lt;BR /&gt; yaxisopts=(display=(ticks tickvalues));;&lt;BR /&gt; if (exists(_attr))&lt;BR /&gt; heatmapparm x=_x y=_y colorresponse=Recurrence / name='a'; *colorresponse=attrvar kills it;&lt;BR /&gt; else&lt;BR /&gt; heatmapparm x=_x y=_y colorresponse=Recurrence / name='a';&lt;BR /&gt; continuouslegend 'a';&lt;BR /&gt; endif;&lt;BR /&gt; endlayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;ODS GRAPHICS / width=5in height=4in IMAGENAME = 'Heatmap';&lt;BR /&gt;proc sgrender data=H1A1RRF_heat template=Heatmap2; &lt;BR /&gt; dynamic _X='X' _Y='Y' _Z='Recurrence' _T="Heatmap";&lt;BR /&gt; TITLE "Heatmap";&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 03:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247656#M8990</guid>
      <dc:creator>benbuck</dc:creator>
      <dc:date>2016-02-03T03:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do i create a Heat Map with Proc Template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247691#M8991</link>
      <description>&lt;P&gt;I've written &lt;A href="http://blogs.sas.com/content/iml/tag/heat-maps" target="_self"&gt;quite a few blog posts about heat maps.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;There's one about &lt;A href="http://blogs.sas.com/content/iml/2014/08/18/heat-map-in-sas.html" target="_self"&gt;how to create a basic heat map from GTL.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Search my blog for RANGEATTRMAP to see other examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 10:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-i-create-a-Heat-Map-with-Proc-Template/m-p/247691#M8991</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-02-03T10:55:49Z</dc:date>
    </item>
  </channel>
</rss>

