<?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: moving gmap output to the left to accommodate a legend on the right in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/335872#M11668</link>
    <description>&lt;P&gt;Well that's slick.&amp;nbsp; I like it!&amp;nbsp;&amp;nbsp; I will keep that in mind when I am asked again how to get stuff to appear on the right side.&amp;nbsp; That is a lot less work than what my coworker ended up doing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;</description>
    <pubDate>Sat, 25 Feb 2017 19:05:44 GMT</pubDate>
    <dc:creator>BenConner</dc:creator>
    <dc:date>2017-02-25T19:05:44Z</dc:date>
    <item>
      <title>moving gmap output to the left to accommodate a legend on the right</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/327190#M11496</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A coworker of mine is trying to shift gmap output to the left so he can position a legend on the right. &amp;nbsp;He's using annotate for the legend and would like to be able to have the map take 60-65% of the space to the left, leaving room for the vertical legend. &amp;nbsp;Right now the sample code looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;goptions gunit=pt htitle=&lt;STRONG&gt;14&lt;/STRONG&gt; htext=&lt;STRONG&gt;8&lt;/STRONG&gt; ftitle="arial" ftext="arial/bold" cback='white';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;legend1 across=&lt;STRONG&gt;1&lt;/STRONG&gt; origin=(&lt;STRONG&gt;80&lt;/STRONG&gt; pct, &lt;STRONG&gt;30&lt;/STRONG&gt; pct) mode=share label=none value=("Less than 10%" "Between 10% and 25%" "25% or More") shape=bar(&lt;STRONG&gt;20&lt;/STRONG&gt;pt,&lt;STRONG&gt;10&lt;/STRONG&gt;pt);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; annolabel;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length function $ &lt;STRONG&gt;8&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; retain flag &lt;STRONG&gt;0&lt;/STRONG&gt; xsys ysys '3' hsys '3' when 'a' function 'label' position '6';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format text $52.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text="Low Diabetes Prevalence";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size=&lt;STRONG&gt;2.3&lt;/STRONG&gt;; x=&lt;STRONG&gt;80&lt;/STRONG&gt;; y=&lt;STRONG&gt;42&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text="% of County's Members in Plan";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size=&lt;STRONG&gt;2&lt;/STRONG&gt;; x=&lt;STRONG&gt;85&lt;/STRONG&gt;; y=&lt;STRONG&gt;40&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;pattern1 color=CXfffacd; pattern2 color=CXfff59b; pattern3 color=CXFFE705;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;gmap&lt;/STRONG&gt; data=county_map_mcp3 map=county_map_mcp3 anno=annolabel gout=map1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title "Prevalence of Members with Diabetes: &amp;amp;PLAN";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id county;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where MCP_Name="Buckeye";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; choro bin1 / discrete legend=legend1;&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;These will likely be going to RTF output.&lt;/P&gt;
&lt;P&gt;Any suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13357iA22842D0E53DA167/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="sample.PNG" title="sample.PNG" /&gt;</description>
      <pubDate>Tue, 24 Jan 2017 21:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/327190#M11496</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2017-01-24T21:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: moving gmap output to the left to accommodate a legend on the right</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/327200#M11497</link>
      <description>&lt;P&gt;Don't use MODE=share in the legend statement, use MODE=RESERVE&lt;/P&gt;
&lt;P&gt;or Position=(Middle Right Outside) in the legend statement&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2017 21:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/327200#M11497</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-24T21:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: moving gmap output to the left to accommodate a legend on the right</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/332682#M11582</link>
      <description>Hi Ballard,&lt;BR /&gt;&lt;BR /&gt;The coworker who was working on this project decided to circumvent it by dropping the legend and creating an artificial one using the ODS layout facility.  That gave him the control over the page he was looking for.  Some clients are pickier than others at times. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;--Ben</description>
      <pubDate>Tue, 14 Feb 2017 16:10:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/332682#M11582</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2017-02-14T16:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: moving gmap output to the left to accommodate a legend on the right</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/332982#M11599</link>
      <description>&lt;P&gt;Ben - glad you found a work-around!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're curious about how to do it totally within SAS/Graph, here's the trick I use...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I need extra space to the side of a graph/map/etc, I use an extra title statement, and 'angle' it so it shows up to the side of the graph (rather than above the graph). I make the height of the text the amount of space I want (such as height=40pct), and then I make the text of the title 'blank' (so no text shows up - just the blank white-space).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your example, I used:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title2 angle=-90 height=40pct ' ';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then with the extra space, I was able to make the 'origin' (start location) of the legend a little farther left &amp;nbsp;... &amp;nbsp; origin=(70 pct, 30 pct)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then I adjusted the x/y coordinates for your custom annotated legend title slightly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I modified your program to work with a blank Ohio map (since I don't have your response data) to demonstrate:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;goptions gunit=pt htitle=14 htext=8 ftitle="arial" ftext="arial/bold" cback='white';&lt;BR /&gt; &lt;BR /&gt;legend1 across=1 origin=(70 pct, 30 pct) mode=share label=none &lt;BR /&gt; value=("Less than 10%" "Between 10% and 25%" "25% or More") shape=bar(20pt,10pt);&lt;BR /&gt; &lt;BR /&gt;data annolabel;&lt;BR /&gt; length function $ 8;&lt;BR /&gt; retain flag 0 xsys ysys '3' hsys '3' when 'a' function 'label' position '6';&lt;BR /&gt; format text $52.;&lt;BR /&gt; text="Low Diabetes Prevalence";&lt;BR /&gt; size=2.3; x=70; y=43;&lt;BR /&gt; output;&lt;BR /&gt; text="% of County's Members in Plan";&lt;BR /&gt; size=2; x=70; y=40;&lt;BR /&gt; output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data county_map_mcp3; set maps.uscounty (where=(fipstate(state)='OH'));&lt;BR /&gt;run;&lt;BR /&gt; &lt;BR /&gt;pattern1 color=CXfffacd; pattern2 color=CXfff59b; pattern3 color=CXFFE705;&lt;BR /&gt;proc gmap data=county_map_mcp3 map=county_map_mcp3 anno=annolabel gout=map1;&lt;BR /&gt; title1 "Prevalence of Members with Diabetes: &amp;amp;PLAN";&lt;BR /&gt; title2 angle=-90 height=40pct ' ';&lt;BR /&gt; id county;&lt;BR /&gt; /*where MCP_Name="Buckeye";*/&lt;BR /&gt; choro /*bin1*/ county / /*discrete*/ levels=3 legend=legend1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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/7240i14E5215F9729B2CB/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="map_legend.png" title="map_legend.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 13:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/332982#M11599</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2017-02-15T13:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: moving gmap output to the left to accommodate a legend on the right</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/335872#M11668</link>
      <description>&lt;P&gt;Well that's slick.&amp;nbsp; I like it!&amp;nbsp;&amp;nbsp; I will keep that in mind when I am asked again how to get stuff to appear on the right side.&amp;nbsp; That is a lot less work than what my coworker ended up doing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2017 19:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/moving-gmap-output-to-the-left-to-accommodate-a-legend-on-the/m-p/335872#M11668</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2017-02-25T19:05:44Z</dc:date>
    </item>
  </channel>
</rss>

