<?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: PROC GMAP MIDPOINTS option in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190516#M7044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the legend ranges to be guaranteed to be the same in all the maps, you won't be able to just use the midpoints= option. Instead you'll need to manually determine which range each data point falls in (using a data step and 'if/else' statements), and put each into a 'bucket', and then use the midpoints= option to specify the buckets (to make sure they all show up in each map, regardless of whether there are any obsns in that bucket in that particular data). And you can use a user-defined-format to make the buckets print showing the legend ranges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some code snippets that might help get you started ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;value buckfmt&lt;BR /&gt;1 = '1-7'&lt;BR /&gt;2 = '8-15'&lt;BR /&gt;3 = '16+'&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data my_data; set my_data;&lt;BR /&gt;format bucket buckfmt.;&lt;/P&gt;&lt;P&gt;if cases&amp;lt;=7 then bucket=1;&lt;BR /&gt;else if cases&amp;lt;=15 then bucket=2;&lt;BR /&gt;else if cases&amp;gt;=16 then bucket=3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gmap data=my_data map=maps.us all;&lt;/P&gt;&lt;P&gt;id statecode;&lt;/P&gt;&lt;P&gt;choro bucket / discrete midpoints=1 2 3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2014 12:25:54 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2014-04-23T12:25:54Z</dc:date>
    <item>
      <title>PROC GMAP MIDPOINTS option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190513#M7041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am creating several US maps, and the response variable is continuous. I do this for a series of years.&lt;/P&gt;&lt;P&gt;I noticed that for different data, I need to use different MIDPOINTS options to make the categories correctly on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes I need to use&lt;/P&gt;&lt;P&gt;MIDPOINTS = OLD RANGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and sometimes &lt;/P&gt;&lt;P&gt;MIDPOINTS = 0 3 8 ...(or an exact set of values)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone explain the difference.&lt;/P&gt;&lt;P&gt;(I have read about MIDPOINTS, and all I found was that&lt;/P&gt;&lt;P&gt;Specifying MIDPOINTS=OLD generates default midpoints using the Nelder algorithm (&lt;SPAN class="strongEmph"&gt;Applied Statistics&lt;/SPAN&gt; 25:94-7, 1976).&amp;nbsp; (&lt;A href="https://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#gmap-choro-statement.htm" title="https://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#gmap-choro-statement.htm"&gt;SAS/GRAPH(R) 9.2: Reference, Second Edition&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe someone can explain this a bit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 11:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190513#M7041</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2014-04-23T11:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GMAP MIDPOINTS option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190514#M7042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want the legends of all the maps to be the same, so you can compare them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I don't need the legends to be the same, and I basically want to "auto-scale" the legend, I just use levels=5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 12:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190514#M7042</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2014-04-23T12:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GMAP MIDPOINTS option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190515#M7043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the legends should be the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 12:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190515#M7043</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2014-04-23T12:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GMAP MIDPOINTS option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190516#M7044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the legend ranges to be guaranteed to be the same in all the maps, you won't be able to just use the midpoints= option. Instead you'll need to manually determine which range each data point falls in (using a data step and 'if/else' statements), and put each into a 'bucket', and then use the midpoints= option to specify the buckets (to make sure they all show up in each map, regardless of whether there are any obsns in that bucket in that particular data). And you can use a user-defined-format to make the buckets print showing the legend ranges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some code snippets that might help get you started ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;BR /&gt;value buckfmt&lt;BR /&gt;1 = '1-7'&lt;BR /&gt;2 = '8-15'&lt;BR /&gt;3 = '16+'&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data my_data; set my_data;&lt;BR /&gt;format bucket buckfmt.;&lt;/P&gt;&lt;P&gt;if cases&amp;lt;=7 then bucket=1;&lt;BR /&gt;else if cases&amp;lt;=15 then bucket=2;&lt;BR /&gt;else if cases&amp;gt;=16 then bucket=3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gmap data=my_data map=maps.us all;&lt;/P&gt;&lt;P&gt;id statecode;&lt;/P&gt;&lt;P&gt;choro bucket / discrete midpoints=1 2 3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 12:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190516#M7044</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2014-04-23T12:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GMAP MIDPOINTS option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190517#M7045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Robert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess my question was more geared towards understanding why when I defined specific values for the midpoints, the buckets seem to be ever so slightly off, but it gets fixed by MIDPOINTS = OLD RANGE option. And for other data it works like a charm (the midpoints = specific values).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 12:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190517#M7045</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2014-04-23T12:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GMAP MIDPOINTS option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190518#M7046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless you're dealing with discrete values (and using the discrete option), I think the midpoints= option is going to provide varying ranges in your legend (depending on what data you're plotting). I never truse the midpoints= option to choose my legend ranges.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 12:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190518#M7046</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2014-04-23T12:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GMAP MIDPOINTS option</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190519#M7047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;RobertAllison@SAS wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Instead you'll need to manually determine which range each data point falls &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;I have found the XML routine CALL GSCALE useful for data-driven uniform axis calculations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 13:20:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PROC-GMAP-MIDPOINTS-option/m-p/190519#M7047</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-04-23T13:20:08Z</dc:date>
    </item>
  </channel>
</rss>

