<?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 to run The heatmapparm statement? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370796#M12817</link>
    <description>&lt;P&gt;I am NOT an expert with either PROC TEMPLATE or PROC SGRENDER, but tried your code anyhow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It wouldn't run unless I removed all of the comments. You didn't provide your data so I couldn't complete the test (i.e., run PROC SGRENDER), but the PROC TEMPLATE ran without error. I ran:&lt;/P&gt;
&lt;PRE&gt;proc template;
	define statgraph heatmap;
	dynamic _TRD_EVENT_tm _TRD_EVENT_dt _price _T;
		begingraph;
			entrytitle _T;             
			layout overlay;
				heatmapparm x=_TRD_EVENT_tm y=_TRD_EVENT_dt colorresponse=_price /  
				xbinaxis=false ybinaxis=false; 
				continuouslegend "heatmap";
			endlayout;
		endgraph;
	end;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jun 2017 03:13:46 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-06-27T03:13:46Z</dc:date>
    <item>
      <title>How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370789#M12816</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;              /* basic heat map with continuous color ramp */
	define statgraph heatmap;
	dynamic _TRD_EVENT_tm _TRD_EVENT_dt _price _T;        /* dynamic variables */
		begingraph;
			entrytitle _T;             /* specify title at run time (optional) */  
			layout overlay;
				heatmapparm x=_TRD_EVENT_tm y=_TRD_EVENT_dt colorresponse=_price /  /* specify variables at run time */
				name="heatmap" primary=true
				xbinaxis=false ybinaxis=false;  /* tick marks based on range of X and Y */
				continuouslegend "heatmap";
			endlayout;
		endgraph;
	end;
run;
proc sgrender data=sampledata05 template=Heatmap; 
   dynamic _TRD_EVENT_tm='Time' _TRD_EVENT_dt='Date' _Price='Price' _T="Basic Heat Map";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And, here is the log file:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WARNING: The heatmapparm statement named 'heatmap' will not be drawn because one or more of the
         required arguments were not supplied.
WARNING: CONTINUOUSLEGEND statement references a plot named (heatmap) that is not assigned to any
         plot. The name will be ignored.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;All variables are numeric.&lt;/P&gt;&lt;P&gt;How can I fix that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 01:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370789#M12816</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-06-27T01:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370796#M12817</link>
      <description>&lt;P&gt;I am NOT an expert with either PROC TEMPLATE or PROC SGRENDER, but tried your code anyhow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It wouldn't run unless I removed all of the comments. You didn't provide your data so I couldn't complete the test (i.e., run PROC SGRENDER), but the PROC TEMPLATE ran without error. I ran:&lt;/P&gt;
&lt;PRE&gt;proc template;
	define statgraph heatmap;
	dynamic _TRD_EVENT_tm _TRD_EVENT_dt _price _T;
		begingraph;
			entrytitle _T;             
			layout overlay;
				heatmapparm x=_TRD_EVENT_tm y=_TRD_EVENT_dt colorresponse=_price /  
				xbinaxis=false ybinaxis=false; 
				continuouslegend "heatmap";
			endlayout;
		endgraph;
	end;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 03:13:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370796#M12817</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-27T03:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370874#M12818</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Respected #art297,&amp;nbsp;I &lt;STRONG&gt;appreciate&lt;/STRONG&gt; your&amp;nbsp;support.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, warnings are&amp;nbsp;still alive!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I attach a sample of my dataset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 12:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370874#M12818</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-06-27T12:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370942#M12819</link>
      <description>&lt;P&gt;It looks like you copied the code from my blog post &lt;A href="http://blogs.sas.com/content/iml/2014/08/18/heat-map-in-sas.html" target="_self"&gt;"Creating a basic heat map in SAS".&lt;/A&gt;&amp;nbsp;The post includes sample data and output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume the problem is the data, not the template. In the data that you attached, the TRD_EVENT_TM has the constant value 1/01/1900 and the variable TRD_EVENT_DT appears to have only two dates. You also have multiple repeated values. The HEATMAPPARM statement is expecting a regular grid of values with a unique response value for each cell.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 14:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370942#M12819</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-27T14:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370948#M12820</link>
      <description>&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;.. your variables don't match the one's you specified. Also, your time variable is a datetime variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following worked for me:&lt;/P&gt;
&lt;PRE&gt;proc import datafile='/folders/myfolders/test.xls'
    dbms=xls out=sampledata05 replace;
  sheet=test;
run;

data sampledata05;
  set sampledata05;
  format time time5.;
  time=timepart(trd_event_tm);
run;

proc template;
	define statgraph heatmap;
	dynamic _TRD_EVENT_tm _TRD_EVENT_dt _price _T;
		begingraph;
			entrytitle _T;             
			layout overlay;
				heatmapparm x=_TRD_EVENT_tm y=_TRD_EVENT_dt COLORRESPONSE=_price/
				name='heatmapparm' xbinaxis=false ybinaxis=false; 
				continuouslegend "heatmapparm" / location=outside valign=bottom;
			endlayout;
		endgraph;
	end;
run;
proc sgrender data=sampledata05 template=Heatmapparm; 
   dynamic _TRD_EVENT_tm='time' _TRD_EVENT_dt='TRD_EVENT_dt' _Price='Price' _T="Basic Heat Map";
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 16:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370948#M12820</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-27T16:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370981#M12821</link>
      <description>&lt;P&gt;Yes &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&lt;SPAN class="login-bold"&gt;, I use your code and t&lt;/SPAN&gt;hank you for everything you’ve done.&lt;/P&gt;&lt;P&gt;I work with big data and the sample, which I&amp;nbsp;attached, has a time and date variables that are not constant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;'s rewritten codes, although there is an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Unable to restore 'Heatmapparm' from template store!&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 15:47:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370981#M12821</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-06-27T15:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370983#M12822</link>
      <description>Here is an error:&lt;BR /&gt;ERROR: Unable to restore 'Heatmapparm' from template store!</description>
      <pubDate>Tue, 27 Jun 2017 15:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370983#M12822</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-06-27T15:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370991#M12823</link>
      <description>&lt;P&gt;There was an error in the datastep I used, but the code produced a map (without any errors). The correct datastep should have been:&lt;/P&gt;
&lt;PRE&gt;data sampledata05;
  set sampledata05;
  format time time5.;
  time=timepart(trd_event_tm);
run;
&lt;/PRE&gt;
&lt;P&gt;I corrected it in the post as well. However, it doesn't answer the question of why you are getting an error, as mine ran correctly whether it was corrected or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll have to leave it to someone like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;who is more familiar with the technique than I am. Sorry I couldn't be of more help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 16:23:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/370991#M12823</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-27T16:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/371002#M12824</link>
      <description>&lt;P&gt;That's the error message you get if you can't overwrite a template. I encounter this sometimes when I am running two copies of SAS: The first copy locks the template files and the second can't overwrite.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest thing to do it to exit all copies of SAS and then restart one copy.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 17:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/371002#M12824</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-27T17:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to run The heatmapparm statement?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/371035#M12825</link>
      <description>Would you tell me how can I do that, please?&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Tue, 27 Jun 2017 19:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-run-The-heatmapparm-statement/m-p/371035#M12825</guid>
      <dc:creator>aminkarimid</dc:creator>
      <dc:date>2017-06-27T19:14:55Z</dc:date>
    </item>
  </channel>
</rss>

