<?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: sgplot scatter and series (supress one Legend) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735794#M21395</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;said, you can use the KEYLEGEND statement, with the NAME option. Here is an example, that you can use below to understand things better. Also there may not be any use for you to use the SCATTER statement, because you can also use the MARKERS option in the SERIES statement to produce the markers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data stocks;&lt;BR /&gt;&amp;nbsp; set sashelp.stocks;&lt;BR /&gt;&amp;nbsp; emphasis = 2;&lt;BR /&gt;&amp;nbsp; if stock eq 'Microsoft' then emphasis=1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title 'Microsoft Compared to IBM and Intel';&lt;BR /&gt;proc sgplot data=stocks (where=(date &amp;gt;= "01jan2003"d));&lt;BR /&gt;&amp;nbsp; series x=date y=close / group=stock grouplc=emphasis name="leg";&amp;nbsp;&lt;BR /&gt;&amp;nbsp; scatter x=date y=close / group=stock;&lt;BR /&gt;&amp;nbsp; keylegend "leg";&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 21:46:57 GMT</pubDate>
    <dc:creator>djrisks</dc:creator>
    <dc:date>2021-04-20T21:46:57Z</dc:date>
    <item>
      <title>sgplot scatter and series (supress one Legend)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735755#M21390</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I used sgplot to create a scatter and series plot. I get two legends as result. How can are supress one since they are both the same.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 20:22:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735755#M21390</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-20T20:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot scatter and series (supress one Legend)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735765#M21392</link>
      <description>Look into KEYLEGEND statement.</description>
      <pubDate>Tue, 20 Apr 2021 20:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735765#M21392</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-20T20:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot scatter and series (supress one Legend)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735769#M21393</link>
      <description>&lt;P&gt;Use the NAME option on one of the plots, and reference that name from the KEYLEGEND statement (as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;mentioned). That will give you the one legend you want.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 20:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735769#M21393</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-04-20T20:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot scatter and series (supress one Legend)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735794#M21395</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;said, you can use the KEYLEGEND statement, with the NAME option. Here is an example, that you can use below to understand things better. Also there may not be any use for you to use the SCATTER statement, because you can also use the MARKERS option in the SERIES statement to produce the markers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data stocks;&lt;BR /&gt;&amp;nbsp; set sashelp.stocks;&lt;BR /&gt;&amp;nbsp; emphasis = 2;&lt;BR /&gt;&amp;nbsp; if stock eq 'Microsoft' then emphasis=1;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title 'Microsoft Compared to IBM and Intel';&lt;BR /&gt;proc sgplot data=stocks (where=(date &amp;gt;= "01jan2003"d));&lt;BR /&gt;&amp;nbsp; series x=date y=close / group=stock grouplc=emphasis name="leg";&amp;nbsp;&lt;BR /&gt;&amp;nbsp; scatter x=date y=close / group=stock;&lt;BR /&gt;&amp;nbsp; keylegend "leg";&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 21:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-scatter-and-series-supress-one-Legend/m-p/735794#M21395</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2021-04-20T21:46:57Z</dc:date>
    </item>
  </channel>
</rss>

