<?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 Help changing legend in SGPLOT from saying LOESS to my Variable and suggestions to improve graph? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Help-changing-legend-in-SGPLOT-from-saying-LOESS-to-my-Variable/m-p/869509#M23672</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created this time series graph with concentration on my left Y axis and Cases on my Right Y axis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used "SCATTER" for my concentration and 'LOESS" for my cases.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have 2 questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) How can I get change my legend from saying "LOESS" to "Cases"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Any suggestions on how to make this look cleaner and nicer to look at?&lt;/P&gt;&lt;P&gt;Below is my code and my current graph. Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data=WWCC;
 SCATTER x=date y=concentration;
 LOESS  x=date y=cases / Y2AXIS lineattrs=(pattern=Solid color=Red);
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-04-12 at 11.03.10 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82656i8507A0323947D8B3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-04-12 at 11.03.10 PM.png" alt="Screenshot 2023-04-12 at 11.03.10 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Apr 2023 06:06:18 GMT</pubDate>
    <dc:creator>rebelde52</dc:creator>
    <dc:date>2023-04-13T06:06:18Z</dc:date>
    <item>
      <title>Help changing legend in SGPLOT from saying LOESS to my Variable and suggestions to improve graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-changing-legend-in-SGPLOT-from-saying-LOESS-to-my-Variable/m-p/869509#M23672</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created this time series graph with concentration on my left Y axis and Cases on my Right Y axis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used "SCATTER" for my concentration and 'LOESS" for my cases.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have 2 questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) How can I get change my legend from saying "LOESS" to "Cases"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Any suggestions on how to make this look cleaner and nicer to look at?&lt;/P&gt;&lt;P&gt;Below is my code and my current graph. Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data=WWCC;
 SCATTER x=date y=concentration;
 LOESS  x=date y=cases / Y2AXIS lineattrs=(pattern=Solid color=Red);
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-04-12 at 11.03.10 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82656i8507A0323947D8B3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-04-12 at 11.03.10 PM.png" alt="Screenshot 2023-04-12 at 11.03.10 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 06:06:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-changing-legend-in-SGPLOT-from-saying-LOESS-to-my-Variable/m-p/869509#M23672</guid>
      <dc:creator>rebelde52</dc:creator>
      <dc:date>2023-04-13T06:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help changing legend in SGPLOT from saying LOESS to my Variable and suggestions to improve graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-changing-legend-in-SGPLOT-from-saying-LOESS-to-my-Variable/m-p/869515#M23673</link>
      <description>Add the option legendlabel="Cases" to your LOESS statement, to get the proper legend.</description>
      <pubDate>Thu, 13 Apr 2023 07:15:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-changing-legend-in-SGPLOT-from-saying-LOESS-to-my-Variable/m-p/869515#M23673</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2023-04-13T07:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help changing legend in SGPLOT from saying LOESS to my Variable and suggestions to improve graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Help-changing-legend-in-SGPLOT-from-saying-LOESS-to-my-Variable/m-p/869553#M23676</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data wwcc;
 set sashelp.stocks;
 if stock='IBM';
 label open='concentration' close='Cases';
run;

proc sgplot data=WWCC;
 SCATTER x=date y=open;
 LOESS  x=date y=close / Y2AXIS lineattrs=(pattern=Solid color=Red)  legendlabel='Cases';
 yaxis type=log;
 y2axis type=log;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1681386200008.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82661iC2F8C5E5D435DF8D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1681386200008.png" alt="Ksharp_0-1681386200008.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 11:43:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Help-changing-legend-in-SGPLOT-from-saying-LOESS-to-my-Variable/m-p/869553#M23676</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-04-13T11:43:36Z</dc:date>
    </item>
  </channel>
</rss>

