<?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 Graph Legend Manipulation in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Graph-Legend-Manipulation/m-p/9148#M100</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I was wondering if there was a way to rename the character names of variables directly in the legend. I have a scatterplot that looks great but the legend says "Indian" and "Arctic" with the corresponding symbols. Is there any way I can make the legend say "Indian Ocean" and "Arctic Ocean" directly on the graph?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Dec 2011 21:04:32 GMT</pubDate>
    <dc:creator>CGood</dc:creator>
    <dc:date>2011-12-05T21:04:32Z</dc:date>
    <item>
      <title>Graph Legend Manipulation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-Legend-Manipulation/m-p/9148#M100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I was wondering if there was a way to rename the character names of variables directly in the legend. I have a scatterplot that looks great but the legend says "Indian" and "Arctic" with the corresponding symbols. Is there any way I can make the legend say "Indian Ocean" and "Arctic Ocean" directly on the graph?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 21:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-Legend-Manipulation/m-p/9148#M100</guid>
      <dc:creator>CGood</dc:creator>
      <dc:date>2011-12-05T21:04:32Z</dc:date>
    </item>
    <item>
      <title>Graph Legend Manipulation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-Legend-Manipulation/m-p/9149#M101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use legendlabel='Indian Ocean' as an option under seriesplot of your graph and the same for Arctic Ocean.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 21:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-Legend-Manipulation/m-p/9149#M101</guid>
      <dc:creator>Tracey_D</dc:creator>
      <dc:date>2011-12-05T21:19:01Z</dc:date>
    </item>
    <item>
      <title>Graph Legend Manipulation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Graph-Legend-Manipulation/m-p/9150#M102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a "best practice", I would recommend using a data-driven solution, rather than hard-coding the text.&amp;nbsp; If you hard-code text in the legend, then one day if/when the data changes, then the hard-coded legend will be wrong (which could go un-noticed and compromise the data-integrity of the graph).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't mention which proc you're using, so here's an example using traditional gplot...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a plot with 'M' and 'F' in the legend:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;legend1 label=none position=(bottom center);&lt;/P&gt;&lt;P&gt;proc gplot data=sashelp.class;&lt;/P&gt;&lt;P&gt;plot height*weight=sex / legend=legend1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, instead of 'M' and 'F', let's say we want 'Male' and 'Female' to show up in the legend.&amp;nbsp; You could either create a user-defined format that makes 'M' and 'F' show up as 'Male' and 'Female' ... or you could add an extra variable to the data, like so ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mod_class; set sashelp.class;&lt;BR /&gt;length mod_sex $10;&lt;BR /&gt;if sex='M' then mod_sex='Male';&lt;BR /&gt;else if sex='F' then mod_sex='Female';&lt;BR /&gt;else mod_sex=sex;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;legend1 label=none position=(bottom center);&lt;BR /&gt;proc gplot data=mod_class;&lt;BR /&gt;plot height*weight=mod_sex / legend=legend1;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 14:25:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Graph-Legend-Manipulation/m-p/9150#M102</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-12-06T14:25:15Z</dc:date>
    </item>
  </channel>
</rss>

