<?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 name a JPEG export of a PROC GMAP? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634713#M19681</link>
    <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2020 12:06:06 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2020-03-25T12:06:06Z</dc:date>
    <item>
      <title>How do I name a JPEG export of a PROC GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634385#M19674</link>
      <description>&lt;P&gt;I'm trying to output my PROC GMAP results as a JPEG to put into a presentation. I found an &lt;A href="https://communities.sas.com/t5/Graphics-Programming/Exporting-a-map-from-proc-gmap/m-p/310404" target="_blank" rel="noopener"&gt;earlier topic&lt;/A&gt; and used that code. However, that topic doesn't specify how to edit the name of the resulting JPEG file. Since I need to output a lot of maps, I would like to give each JPEG a name other than "GMAP&lt;EM&gt;nn&lt;/EM&gt;", to make it easier to identify.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. How do can edit the name of the JPEG file?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. How do I make that name dynamic to use in a macro?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME plots "&amp;amp;OUTPATH";
goptions reset=all 
DEVICE=jpeg 
xpixels=1200
ypixels=1000
transparency 
GSFNAME=plots 
GSFMODE=REPLACE 
NOFILEONLY;
ods _all_ close;
ods listing;

proc gmap map=map data=data;
id ID1;
choro DATA1/
cdefault=gold
coutline=white
legend=legend1;
legend1 value=(h=1 f=arial) label=(h=1 f=arial 'DATA1');
run;
quit;
ods listing close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Mar 2020 09:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634385#M19674</guid>
      <dc:creator>young_spruce</dc:creator>
      <dc:date>2020-03-24T09:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I name a JPEG export of a PROC GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634386#M19675</link>
      <description>&lt;P&gt;Switch to using PROC SGMAP, then you can make use of ODS features.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 09:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634386#M19675</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-24T09:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I name a JPEG export of a PROC GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634396#M19676</link>
      <description>&lt;P&gt;Hi Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply. I'm very unfamiliar with SGMAPS and can't quite figure out how to reproduce the map I created using the GMAP procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you help me translate the code below into the SGMAP procedure? I'm having trouble defining colors, using the legend and subsetting the data.&amp;nbsp;&amp;nbsp;&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;pattern1 value=solid color='CXeff3ff'; 
pattern2 value=solid color='CXbdd7e7';
pattern3 value=solid color='CX6baed6'; 
pattern4 value=solid color='CX3182bd'; 
pattern5 value=solid color='CX08519c'; 

proc gmap map=map data=data;
id ID1;
choro DATA1/
cdefault=white
coutline=white
legend=legend1;
legend1 value=(h=1 f=arial) label=(h=1 f=arial 'DATA1');
where ID2="VALUE";
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 10:45:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634396#M19676</guid>
      <dc:creator>young_spruce</dc:creator>
      <dc:date>2020-03-24T10:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I name a JPEG export of a PROC GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634519#M19677</link>
      <description>&lt;P&gt;I think the NAME option on the CHORO statement will do what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 17:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634519#M19677</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2020-03-24T17:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I name a JPEG export of a PROC GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634713#M19681</link>
      <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 12:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/634713#M19681</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-03-25T12:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I name a JPEG export of a PROC GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/636852#M19707</link>
      <description>&lt;P&gt;Generally, with Proc Gmap, you can use the name= option on the choro statement to control the name of the gseg, and then the name of the gseg is used as the name of the png (or jpeg) image file. The syntax you're using is a bit 'old' ... I would recommend this newer syntax (and I also recommend using png output, rather than jpeg). The following code saves the output as the name 'mymap.png'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let name=mymap;&lt;/P&gt;
&lt;P&gt;filename odsout '.';&lt;/P&gt;
&lt;P&gt;goptions device=png;&lt;/P&gt;
&lt;P&gt;ODS LISTING CLOSE;&lt;BR /&gt;ODS HTML path=odsout body="&amp;amp;name..htm" style=htmlblue;&lt;/P&gt;
&lt;P&gt;proc gmap map=mapsgfk.us data=mapsgfk.us;&lt;BR /&gt;id state;&lt;BR /&gt;choro segment / levels=1 nolegend &lt;FONT color="#993366"&gt;&lt;STRONG&gt;name="&amp;amp;name"&lt;/STRONG&gt;&lt;/FONT&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;quit;&lt;BR /&gt;ODS HTML CLOSE;&lt;BR /&gt;ODS LISTING;&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;</description>
      <pubDate>Thu, 02 Apr 2020 12:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/636852#M19707</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2020-04-02T12:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I name a JPEG export of a PROC GMAP?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/641905#M19783</link>
      <description>Sorry for the delayed response. Using the name option solved my problem and using your code worked perfectly. Thanks a lot for the help.</description>
      <pubDate>Wed, 22 Apr 2020 12:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-do-I-name-a-JPEG-export-of-a-PROC-GMAP/m-p/641905#M19783</guid>
      <dc:creator>young_spruce</dc:creator>
      <dc:date>2020-04-22T12:23:09Z</dc:date>
    </item>
  </channel>
</rss>

