<?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 change color on the map and more. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324312#M11347</link>
    <description>&lt;P&gt;Thank you Ballardw for your inputs! I'm sorry that I did not state it clear.&lt;/P&gt;&lt;P&gt;Actually, I want to color all the counties to be yellow, not the county name. If it's like what you mentioned: there is no last "number", how can I color all the counties to be yellow where the last part of the data set is greater than 9.7?&lt;/P&gt;&lt;P&gt;Can you manually pick those counties out and color them to be yellow, and let the rest counties to be black and white? those counties include:Chelan,Clallam,Ferry,Island,Jefferson,Kitsap,Lincoln,Okanogan,Pend Orielle, pierce,skagit, snohomish, spokane, stevens, thurston, whatcom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help! This is an urgent task!!!&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2017 16:25:50 GMT</pubDate>
    <dc:creator>dding</dc:creator>
    <dc:date>2017-01-12T16:25:50Z</dc:date>
    <item>
      <title>How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324124#M11339</link>
      <description>&lt;P&gt;I'm a SAS beginner. I have the following code:&lt;/P&gt;&lt;P&gt;What should I do to label all the counties to be yellow if the last number is greater than 9.7 (see all the underlined data)? If the last number is smaller than 9.7, I want the county map to be black and white.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What should I do to remove the word "county" from the map to save some space? For example: I want the Adams County to be shown on map as "Adams" instead of "Adams County". I want to remove the word "county" from each and every county names.&lt;/P&gt;&lt;P&gt;Please help. Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; sample(rename=(county=county_name));&lt;/P&gt;&lt;P&gt;&amp;nbsp; input County $19. @&lt;STRONG&gt;21&lt;/STRONG&gt; Data $8.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* determine the name of the county to merge with MAPS.CNTYNAME to&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;obtain the county FIPS code */&lt;/P&gt;&lt;P&gt;&amp;nbsp; countynm=upcase(transtrn(county,'County',''));&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Adams County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/7.3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Asotin County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/2.7&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Benton County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/9.2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;&lt;FONT color="#000000"&gt;Chelan County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/9.7&lt;/FONT&gt;&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Clallam County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/19.8&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Clark County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/5.8&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Columbia County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/7.4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Cowlitz County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/5.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Douglas County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/9.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Ferry County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/12.4&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Franklin County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/7.3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Garfield County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/3.3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Grant County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/6.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Grays Harbor County 1/2/6.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Island County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/12.2&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Jefferson County &amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/10&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;King County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/8.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Kitsap County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/10.4&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Kittitas County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/8.1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Klickitat County &amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/3.4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Lewis County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/6.7&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Lincoln County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/10.4&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Mason County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/8.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Okanogan County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/11.5&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Pacific County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/3.4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Pend Oreille County 1/2/11&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Pierce County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/9.8&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;San Juan County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/9.6&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Skagit County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/16.9&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Skamania County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/7.1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Snohomish County &amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/12.1&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Spokane County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/9.9&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Stevens County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/12.4&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Thurston County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/11.6&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Wahkiakum County &amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/5.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Walla Walla County &amp;nbsp;1/2/5.4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;U&gt;Whatcom County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/25.9&lt;/U&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Whitman County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/5.7&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Yakima County &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1/2/4.5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sort&lt;/STRONG&gt;; by countynm;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; sample2(drop=countynm);&lt;/P&gt;&lt;P&gt;&amp;nbsp; merge sample maps.cntyname(where=(state=&lt;STRONG&gt;53&lt;/STRONG&gt;) keep=state countynm county);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;by countynm;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;/* project a county map of Washington */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;gproject&lt;/STRONG&gt; data=maps.counties out=wa;&lt;/P&gt;&lt;P&gt;&amp;nbsp; where state=&lt;STRONG&gt;53&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id state county;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;/* make the annotate macros available */&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;EM&gt;annomac&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;/* determine the visual center of the county */&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;EM&gt;centroid&lt;/EM&gt;&lt;/STRONG&gt;(wa,center,state county);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* create an annotate data set to place the label */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; anno;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;merge sample2 center;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;by state county;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain xsys ysys '2' when 'a' function 'label' color 'black' size &lt;STRONG&gt;1&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length text $&lt;STRONG&gt;20&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; text=data;&lt;/P&gt;&lt;P&gt;&amp;nbsp; position='5';&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; text=county_name;&lt;/P&gt;&lt;P&gt;&amp;nbsp; position='8';&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* You can define patterns to use to color the map areas using the&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;PATTERN statement */&lt;/P&gt;&lt;P&gt;/* create the map */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;gmap&lt;/STRONG&gt; data=sample2 map=wa;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id state county;&lt;/P&gt;&lt;P&gt;&amp;nbsp; choro data / nolegend anno=anno;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 00:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324124#M11339</guid>
      <dc:creator>dding</dc:creator>
      <dc:date>2017-01-12T00:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324138#M11342</link>
      <description>&lt;P&gt;If you want to remove the word "COUNTY" you'll need to change your data. You can use the TRANSWRD function within a data step to remove the word COUNTY.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a lot of papers on Lexjansen.com that show how to use PROC GMAP, you may want to start there. Here's one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi29/251-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/251-29.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the MIDPOINTS option in GMAP to specify your boundaries and colors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 02:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324138#M11342</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-01-12T02:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324291#M11346</link>
      <description>&lt;P&gt;Since your values for data are like "1/2/7.3" Then there is no last "number" as&amp;nbsp;that is a character value.&lt;/P&gt;
&lt;P&gt;You are not clear as to whether only the County or the County and the data are to show in yellow. I will assume the later.&lt;/P&gt;
&lt;P&gt;Note that the LENGTH of your color variable (and function should be ) set to allow longer text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data anno;
   merge sample2 center;
   by state county;
   LENGTH COLOR $ 8;
  retain xsys ysys '2' when 'a' function 'label' color 'black' size 1;
  length text $20;
  if scan(data,3,'/')&amp;gt;9.7 then color='yellow';
  County = strip(tranwrd(county,' County',''));
  text=data;
  position='5';
  output;
  text=county_name;
  position='8';
  output;
run;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post code in the code box opened with the {i} icon.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 16:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324291#M11346</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-12T16:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324312#M11347</link>
      <description>&lt;P&gt;Thank you Ballardw for your inputs! I'm sorry that I did not state it clear.&lt;/P&gt;&lt;P&gt;Actually, I want to color all the counties to be yellow, not the county name. If it's like what you mentioned: there is no last "number", how can I color all the counties to be yellow where the last part of the data set is greater than 9.7?&lt;/P&gt;&lt;P&gt;Can you manually pick those counties out and color them to be yellow, and let the rest counties to be black and white? those counties include:Chelan,Clallam,Ferry,Island,Jefferson,Kitsap,Lincoln,Okanogan,Pend Orielle, pierce,skagit, snohomish, spokane, stevens, thurston, whatcom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help! This is an urgent task!!!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 16:25:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324312#M11347</guid>
      <dc:creator>dding</dc:creator>
      <dc:date>2017-01-12T16:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324355#M11353</link>
      <description>&lt;P&gt;Generally for maps involving ranges of data then I use a combination of a custom format and pattern statements. Patterns override the default style colors. However there are problems with this approach because you are using text and 1/2/10.3 is less than 1/2/9.7 by the character sort orders. Create a numeric varaible that only has that actually value and use that for the choro variable. It is not uncommon to do such. Your annotate variable value does not have to be the same as the numeric. Then the format pattern would work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc format;
   value myrange
   0 - &amp;lt;9.7 = '&amp;lt;9.7'
   9.7 -high = '9.7+'
   ;
run;
/* your other code goes here but need to incorporate
  a numeric data variable*/
pattern1 color=white;
pattern2 color=yellow;

proc gmap data=sample2 map=wa;
  id state county;
  choro numericdata / nolegend anno=anno;
run;
quit;&lt;/PRE&gt;
&lt;P&gt;You could add:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Numericdata = input(scan(data,3,'/'),best5.);&lt;/P&gt;
&lt;P&gt;to the SAMPLE2 datastep code to get a numeric variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When discussing map, or graph items in general, it is very import to specify whether you are talking about data values or appearance of map/graph features. You have for county potentially: the color of the displayed county AREA, the color of the displayed county BORDER, the color of the TEXT of the county name, the color of the BACKGROUND to the count name text for example. In other graphic procedures you may get to throw in things such as axis text labels, axis tickmarks, axis background to the text labels, colors of series lines, markers, or labels all involving the same variable name.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 17:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324355#M11353</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-12T17:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324416#M11365</link>
      <description>&lt;P&gt;Thank you Ballard!&lt;/P&gt;&lt;P&gt;Can you please help me to check the following code and revised to get what I want?&lt;/P&gt;&lt;P&gt;I want the color of the displayed counties' AREA to be changed to yellow. And let the rest counties to be black and white.&amp;nbsp;&amp;nbsp;The counties to be yellow including: Chelan,Clallam,Ferry,Island,Jefferson,Kitsap,Lincoln,Okanogan,Pend Orielle, pierce,skagit, snohomish, spokane, stevens, thurston, whatcom, where the last part of the data set is greater than 7.9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sample(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rename&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(county=county_name));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; County &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$19.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; @&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;21&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; Data &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$8.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* determine the name of the county to merge with MAPS.CNTYNAME to &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;obtain the county FIPS code */&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;countynm=upcase(transtrn(county,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'County'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Adams County 1/2/7.3&lt;/P&gt;&lt;P&gt;Asotin County 1/2/2.7&lt;/P&gt;&lt;P&gt;Benton County 1/2/9.2&lt;/P&gt;&lt;P&gt;Chelan County 1/2/9.7&lt;/P&gt;&lt;P&gt;Clallam County 1/2/19.8&lt;/P&gt;&lt;P&gt;Clark County 1/2/5.8&lt;/P&gt;&lt;P&gt;Columbia County 1/2/7.4&lt;/P&gt;&lt;P&gt;Cowlitz County 1/2/5.5&lt;/P&gt;&lt;P&gt;Douglas County 1/2/9.5&lt;/P&gt;&lt;P&gt;Ferry County 1/2/12.4&lt;/P&gt;&lt;P&gt;Franklin County 1/2/7.3&lt;/P&gt;&lt;P&gt;Garfield County 1/2/3.3&lt;/P&gt;&lt;P&gt;Grant County 1/2/6.5&lt;/P&gt;&lt;P&gt;Grays Harbor County 1/2/6.5&lt;/P&gt;&lt;P&gt;Island County 1/2/12.2&lt;/P&gt;&lt;P&gt;Jefferson County 1/2/10&lt;/P&gt;&lt;P&gt;King County 1/2/8.5&lt;/P&gt;&lt;P&gt;Kitsap County 1/2/10.4&lt;/P&gt;&lt;P&gt;Kittitas County 1/2/8.1&lt;/P&gt;&lt;P&gt;Klickitat County 1/2/3.4&lt;/P&gt;&lt;P&gt;Lewis County 1/2/6.7&lt;/P&gt;&lt;P&gt;Lincoln County 1/2/10.4&lt;/P&gt;&lt;P&gt;Mason County 1/2/8.5&lt;/P&gt;&lt;P&gt;Okanogan County 1/2/11.5&lt;/P&gt;&lt;P&gt;Pacific County 1/2/3.4&lt;/P&gt;&lt;P&gt;Pend Oreille County 1/2/11&lt;/P&gt;&lt;P&gt;Pierce County 1/2/9.8&lt;/P&gt;&lt;P&gt;San Juan County 1/2/9.6&lt;/P&gt;&lt;P&gt;Skagit County 1/2/16.9&lt;/P&gt;&lt;P&gt;Skamania County 1/2/7.1&lt;/P&gt;&lt;P&gt;Snohomish County 1/2/12.1&lt;/P&gt;&lt;P&gt;Spokane County 1/2/9.9&lt;/P&gt;&lt;P&gt;Stevens County 1/2/12.4&lt;/P&gt;&lt;P&gt;Thurston County 1/2/11.6&lt;/P&gt;&lt;P&gt;Wahkiakum County 1/2/5.5&lt;/P&gt;&lt;P&gt;Walla Walla County 1/2/5.4&lt;/P&gt;&lt;P&gt;Whatcom County 1/2/25.9&lt;/P&gt;&lt;P&gt;Whitman County 1/2/5.7&lt;/P&gt;&lt;P&gt;Yakima County 1/2/4.5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sort&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; countynm;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sample2(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=countynm);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;merge&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sample maps.cntyname(where=(state=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;53&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;) keep=state countynm county);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; countynm;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;/* project a county map of Washington */&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;gproject&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=maps.counties &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=wa;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; state=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;53&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;id&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; state county;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;/* make the annotate macros available */&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;annomac&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;/* determine the visual center of the county */&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;centroid&lt;/I&gt;&lt;/STRONG&gt;(wa,center,state county);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* create an annotate data set to place the label */&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;value&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; myrange&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; - &amp;lt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;9.7&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'&amp;lt;9.7'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;9.7&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; -high = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'9.7+'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; anno;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;merge&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; sample2 center;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; state county;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; xsys ysys &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'2'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; when &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'a'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; function &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'label'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; color &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'black'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; size &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; text $&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;20&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Numericdata = input(scan(data,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'/'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;),&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;best5.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; scan(data,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'/'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;)&amp;gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;9.7&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; color=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'yellow'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;County = strip(tranwrd(county,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;' County'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;text=data;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;position=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'5'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;text=county_name;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;position=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'8'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* You can define patterns to use to color the map areas using the&lt;/P&gt;&lt;P&gt;PATTERN statement */&lt;/P&gt;&lt;P&gt;/* create the map */&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;gmap&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=sample2 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;map&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=wa;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;id&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; state county;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;choro&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; data / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;nolegend&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;anno&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=anno;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2017 21:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324416#M11365</guid>
      <dc:creator>dding</dc:creator>
      <dc:date>2017-01-12T21:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324713#M11384</link>
      <description>&lt;P&gt;No pattern statement so you are going to get things in the default style colors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to associate the format with the data values to be graphed. Something like: Format data MyRange. ; as part of the Proc Gmap code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without actual data that's about all I can suggest as this time.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 21:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/324713#M11384</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-13T21:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/325525#M11409</link>
      <description>&lt;P&gt;This is my actual data:&lt;/P&gt;&lt;P&gt;Adams County 1/2/7.3&lt;/P&gt;&lt;P&gt;Asotin County 1/2/2.7&lt;/P&gt;&lt;P&gt;Benton County 1/2/9.2&lt;/P&gt;&lt;P&gt;Chelan County 1/2/9.7&lt;/P&gt;&lt;P&gt;Clallam County 1/2/19.8&lt;/P&gt;&lt;P&gt;Clark County 1/2/5.8&lt;/P&gt;&lt;P&gt;Columbia County 1/2/7.4&lt;/P&gt;&lt;P&gt;Cowlitz County 1/2/5.5&lt;/P&gt;&lt;P&gt;Douglas County 1/2/9.5&lt;/P&gt;&lt;P&gt;Ferry County 1/2/12.4&lt;/P&gt;&lt;P&gt;Franklin County 1/2/7.3&lt;/P&gt;&lt;P&gt;Garfield County 1/2/3.3&lt;/P&gt;&lt;P&gt;Grant County 1/2/6.5&lt;/P&gt;&lt;P&gt;Grays Harbor County 1/2/6.5&lt;/P&gt;&lt;P&gt;Island County 1/2/12.2&lt;/P&gt;&lt;P&gt;Jefferson County 1/2/10&lt;/P&gt;&lt;P&gt;King County 1/2/8.5&lt;/P&gt;&lt;P&gt;Kitsap County 1/2/10.4&lt;/P&gt;&lt;P&gt;Kittitas County 1/2/8.1&lt;/P&gt;&lt;P&gt;Klickitat County 1/2/3.4&lt;/P&gt;&lt;P&gt;Lewis County 1/2/6.7&lt;/P&gt;&lt;P&gt;Lincoln County 1/2/10.4&lt;/P&gt;&lt;P&gt;Mason County 1/2/8.5&lt;/P&gt;&lt;P&gt;Okanogan County 1/2/11.5&lt;/P&gt;&lt;P&gt;Pacific County 1/2/3.4&lt;/P&gt;&lt;P&gt;Pend Oreille County 1/2/11&lt;/P&gt;&lt;P&gt;Pierce County 1/2/9.8&lt;/P&gt;&lt;P&gt;San Juan County 1/2/9.6&lt;/P&gt;&lt;P&gt;Skagit County 1/2/16.9&lt;/P&gt;&lt;P&gt;Skamania County 1/2/7.1&lt;/P&gt;&lt;P&gt;Snohomish County 1/2/12.1&lt;/P&gt;&lt;P&gt;Spokane County 1/2/9.9&lt;/P&gt;&lt;P&gt;Stevens County 1/2/12.4&lt;/P&gt;&lt;P&gt;Thurston County 1/2/11.6&lt;/P&gt;&lt;P&gt;Wahkiakum County 1/2/5.5&lt;/P&gt;&lt;P&gt;Walla Walla County 1/2/5.4&lt;/P&gt;&lt;P&gt;Whatcom County 1/2/25.9&lt;/P&gt;&lt;P&gt;Whitman County 1/2/5.7&lt;/P&gt;&lt;P&gt;Yakima County 1/2/4.5&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 00:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/325525#M11409</guid>
      <dc:creator>dding</dc:creator>
      <dc:date>2017-01-18T00:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change color on the map and more.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/333038#M11608</link>
      <description>&lt;P&gt;I've made a few small changes to your code, to get the map &amp;nbsp;you wanted...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a numeric variable containing the value of the last number in your 'data' field, and then created a Y/N variable saying whether or not to color the map area yellow...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;val3=.; val3=scan(data,3,'/');&lt;BR /&gt; if val3&amp;gt;9.7 then yellow='Y'; else yellow='N';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the SAS tranwrd() function to convert the word 'County' to a blank...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;text=tranwrd(county_name,'County','');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I added pattern statements so gmap will use white &amp;amp; yellow for the 'N' and 'Y' values of the yellow variable ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pattern1 v=s c=white;&lt;BR /&gt;pattern2 v=s c=yellow;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I had gmap use the yellow variable to color the map...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;choro yellow / nolegend&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the complete code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data sample(rename=(county=county_name));&lt;BR /&gt; input County $19. &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78374"&gt;@21&lt;/a&gt; Data $8.;&lt;BR /&gt; /* determine the name of the county to merge with MAPS.CNTYNAME to&lt;BR /&gt; obtain the county FIPS code */&lt;BR /&gt; countynm=upcase(transtrn(county,'County',''));&lt;BR /&gt; val3=.; val3=scan(data,3,'/');&lt;BR /&gt; if val3&amp;gt;9.7 then yellow='Y'; else yellow='N';&lt;BR /&gt; datalines;&lt;BR /&gt;Adams County 1/2/7.3&lt;BR /&gt;Asotin County 1/2/2.7&lt;BR /&gt;Benton County 1/2/9.2&lt;BR /&gt;Chelan County 1/2/9.7&lt;BR /&gt;Clallam County 1/2/19.8&lt;BR /&gt;Clark County 1/2/5.8&lt;BR /&gt;Columbia County 1/2/7.4&lt;BR /&gt;Cowlitz County 1/2/5.5&lt;BR /&gt;Douglas County 1/2/9.5&lt;BR /&gt;Ferry County 1/2/12.4&lt;BR /&gt;Franklin County 1/2/7.3&lt;BR /&gt;Garfield County 1/2/3.3&lt;BR /&gt;Grant County 1/2/6.5&lt;BR /&gt;Grays Harbor County 1/2/6.5&lt;BR /&gt;Island County 1/2/12.2&lt;BR /&gt;Jefferson County 1/2/10&lt;BR /&gt;King County 1/2/8.5&lt;BR /&gt;Kitsap County 1/2/10.4&lt;BR /&gt;Kittitas County 1/2/8.1&lt;BR /&gt;Klickitat County 1/2/3.4&lt;BR /&gt;Lewis County 1/2/6.7&lt;BR /&gt;Lincoln County 1/2/10.4&lt;BR /&gt;Mason County 1/2/8.5&lt;BR /&gt;Okanogan County 1/2/11.5&lt;BR /&gt;Pacific County 1/2/3.4&lt;BR /&gt;Pend Oreille County 1/2/11&lt;BR /&gt;Pierce County 1/2/9.8&lt;BR /&gt;San Juan County 1/2/9.6&lt;BR /&gt;Skagit County 1/2/16.9&lt;BR /&gt;Skamania County 1/2/7.1&lt;BR /&gt;Snohomish County 1/2/12.1&lt;BR /&gt;Spokane County 1/2/9.9&lt;BR /&gt;Stevens County 1/2/12.4&lt;BR /&gt;Thurston County 1/2/11.6&lt;BR /&gt;Wahkiakum County 1/2/5.5&lt;BR /&gt;Walla Walla County 1/2/5.4&lt;BR /&gt;Whatcom County 1/2/25.9&lt;BR /&gt;Whitman County 1/2/5.7&lt;BR /&gt;Yakima County 1/2/4.5&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc sort; by countynm;&lt;BR /&gt;data sample2(drop=countynm);&lt;BR /&gt; merge sample maps.cntyname(where=(state=53) keep=state countynm county);&lt;BR /&gt; by countynm;&lt;BR /&gt;run;&lt;BR /&gt;/* project a county map of Washington */&lt;BR /&gt;proc gproject data=maps.counties out=wa;&lt;BR /&gt; where state=53 ;&lt;BR /&gt; id state county;&lt;BR /&gt;run;&lt;BR /&gt;/* make the annotate macros available */&lt;BR /&gt;%annomac;&lt;BR /&gt;/* determine the visual center of the county */&lt;BR /&gt;%centroid(wa,center,state county);&lt;BR /&gt; &lt;BR /&gt;/* create an annotate data set to place the label */&lt;BR /&gt;data anno;&lt;BR /&gt; merge sample2 center;&lt;BR /&gt; by state county;&lt;BR /&gt; retain xsys ysys '2' when 'a' function 'label' color 'black' size 1;&lt;BR /&gt; length text $20;&lt;BR /&gt; text=data;&lt;BR /&gt; position='5';&lt;BR /&gt; output;&lt;BR /&gt; text=tranwrd(county_name,'County','');&lt;BR /&gt; position='8';&lt;BR /&gt; output;&lt;BR /&gt;run;&lt;BR /&gt; &lt;BR /&gt;pattern1 v=s c=white;&lt;BR /&gt;pattern2 v=s c=yellow;&lt;BR /&gt;proc gmap data=sample2 map=wa;&lt;BR /&gt; id state county;&lt;BR /&gt; choro yellow / nolegend anno=anno;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7247i20C75219A3977748/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="yellowmap.png" title="yellowmap.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 15:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-change-color-on-the-map-and-more/m-p/333038#M11608</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2017-02-15T15:06:35Z</dc:date>
    </item>
  </channel>
</rss>

