<?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: HeatMap Help (Need Help adjusting Y scale) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469637#M16174</link>
    <description>&lt;P&gt;Perfect! Thank you. I also had another question. I was interested in changing the size of the boxes dependant upon a variable. The larger the number, the larger the box, and vice versa. Is there a way to do this?&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2018 14:44:20 GMT</pubDate>
    <dc:creator>mhudec24</dc:creator>
    <dc:date>2018-06-12T14:44:20Z</dc:date>
    <item>
      <title>HeatMap Help (Need Help adjusting Y scale)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469610#M16170</link>
      <description>&lt;P&gt;Im creating a heat map in SAS using proc sgplot to provide a visual for the % gain/loss within several deparments within different divisions. However, I am running into a problem with the y-scale. Being a percentage, I would ideally want positive numbers to be green, negative numbers be red, and neutral numbers be white. I have this color scale set properly, but the scale has .03 as the median instead of 0. Therefore, I am getting positive numbers (.01 and .02) to be red, while they should be green. Is there a way to adjust the Y scale and make 0 white, any positive number green, and any negative number red? I've tried using the ybinstart=-.05, but it is not changing my scale at all. I have attached a picture of the current scale that is incorrect. I appreciate your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 12:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469610#M16170</guid>
      <dc:creator>mhudec24</dc:creator>
      <dc:date>2018-06-12T12:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: HeatMap Help (Need Help adjusting Y scale)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469621#M16172</link>
      <description>&lt;P&gt;I would call this the "Z scale" rather than the Y scale.&amp;nbsp;What you want is a symmetric&amp;nbsp;red-white-green color ramp that is centered on 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two ways to handle this situation.&amp;nbsp;&lt;SPAN&gt;Range attribute maps appeared in 9.4M3. You can define a range attribute map for a symmetric&amp;nbsp;data range. See&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;GTL overview: &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2013/04/14/attributes-map-3-range-attribute-map/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2013/04/14/attributes-map-3-range-attribute-map/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SGPLOT usage:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/06/26/advanced-ods-graphics-range-attribute-maps/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2017/06/26/advanced-ods-graphics-range-attribute-maps/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Your data map might look like this&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;ID&amp;nbsp; &amp;nbsp; ColorModel1 ColorModel2 Min&amp;nbsp; &amp;nbsp;Max&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;myID&amp;nbsp; red&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;white&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-0.07 0&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;myID&amp;nbsp; white&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;green&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; 0.07&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The simpler way (and the way I'd suggest if you don't have a recent version of SAS) is to prepend "fake data" to your data set. See&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://blogs.sas.com/content/iml/2016/02/17/include-and-order-categories-in-legends.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2016/02/17/include-and-order-categories-in-legends.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this case, if your variables are X, Y, and Z, you can prepend the following data&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;X Y&amp;nbsp; Z&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;. . -0.07&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;. .&amp;nbsp; 0.07&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This "data" will force PROC SGPLOT to think that the range of Z is [-0.07, 0.07], but the missing values in X and Y prevent the procedure from including those observations in the graph.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469621#M16172</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-06-12T13:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: HeatMap Help (Need Help adjusting Y scale)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469637#M16174</link>
      <description>&lt;P&gt;Perfect! Thank you. I also had another question. I was interested in changing the size of the boxes dependant upon a variable. The larger the number, the larger the box, and vice versa. Is there a way to do this?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:44:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469637#M16174</guid>
      <dc:creator>mhudec24</dc:creator>
      <dc:date>2018-06-12T14:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: HeatMap Help (Need Help adjusting Y scale)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469642#M16175</link>
      <description>&lt;P&gt;I think the HEATMAP and HEATMAPPARMS statements provide for a uniform grid of X-Y values. However,&amp;nbsp;you might look into using a bubble plot instead of a heat map. The bubble plot is designed to have the marker sizes that vary according to the value of some response. If you use a bubble plot, you might have to bin the data yourself. For examples, see &lt;A href="https://blogs.sas.com/content/iml/2014/08/27/counts-in-2d-bins.html" target="_self"&gt;"counting observations in two-dimensional bins"&lt;/A&gt;&amp;nbsp;and &lt;A href="https://blogs.sas.com/content/iml/2014/09/24/quantile-bin-plot.html" target="_self"&gt;"Designing a quantile bin plot."&lt;/A&gt;&amp;nbsp; For bubble&amp;nbsp;plot basics, see &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/12/19/getting-started-sgplot-part-9-bubble-plot/" target="_self"&gt;"Getting started with a bubble plot."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:53:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/HeatMap-Help-Need-Help-adjusting-Y-scale/m-p/469642#M16175</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-06-12T14:53:06Z</dc:date>
    </item>
  </channel>
</rss>

