<?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 How to do a Very Simple Legend? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410535#M14072</link>
    <description>&lt;P&gt;As you know by now, I'm just learning about plotting!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have developed a line plot of a mean across timepoints, with bars for 95% confidence interval. (PROC GPLOT) I'm trying to create a very simple legend, simply indicating that the red line is treatment group 1 and the blue line is treatment group 2.&amp;nbsp; Everything I try generates stuff that I don't want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an easy way to populate the legend with something simple like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;--- Placebo&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;FONT color="#FF0000"&gt;---- Study Drug&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code (I found it online and it does exactly what I need).&amp;nbsp; Mean1 is the mean per session, Thresh1 contains LCM and UCM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc gplot data=prep5;    
     plot thresh1*session mean1*session thresh2*session mean2*session / overlay haxis=axis1 vaxis=axis2  
    /*legend=legend1*/;
 title1 h=8pt color=black font='courier' J=L "&amp;amp;titlel1";
 title2 h=8pt color=black font='courier' J=L "Protocol: &amp;amp;titlel2 													Page 1 of 1";

 title5 h=8pt color=black font='courier' J=C "&amp;amp;titlel5";
 title6 h=8pt color=black font='courier' J=C "&amp;amp;titlel6";
 title7 h=8pt color=black font='courier' J=C "&amp;amp;titlel7";
  
run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 04 Nov 2017 13:50:37 GMT</pubDate>
    <dc:creator>davehalltwp</dc:creator>
    <dc:date>2017-11-04T13:50:37Z</dc:date>
    <item>
      <title>How to do a Very Simple Legend?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410535#M14072</link>
      <description>&lt;P&gt;As you know by now, I'm just learning about plotting!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have developed a line plot of a mean across timepoints, with bars for 95% confidence interval. (PROC GPLOT) I'm trying to create a very simple legend, simply indicating that the red line is treatment group 1 and the blue line is treatment group 2.&amp;nbsp; Everything I try generates stuff that I don't want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an easy way to populate the legend with something simple like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;--- Placebo&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;FONT color="#FF0000"&gt;---- Study Drug&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code (I found it online and it does exactly what I need).&amp;nbsp; Mean1 is the mean per session, Thresh1 contains LCM and UCM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc gplot data=prep5;    
     plot thresh1*session mean1*session thresh2*session mean2*session / overlay haxis=axis1 vaxis=axis2  
    /*legend=legend1*/;
 title1 h=8pt color=black font='courier' J=L "&amp;amp;titlel1";
 title2 h=8pt color=black font='courier' J=L "Protocol: &amp;amp;titlel2 													Page 1 of 1";

 title5 h=8pt color=black font='courier' J=C "&amp;amp;titlel5";
 title6 h=8pt color=black font='courier' J=C "&amp;amp;titlel6";
 title7 h=8pt color=black font='courier' J=C "&amp;amp;titlel7";
  
run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 Nov 2017 13:50:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410535#M14072</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2017-11-04T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Very Simple Legend?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410547#M14075</link>
      <description>I'd recommend investigating the LEGEND option for GPLOT and then the LEGEND statement. You currently have the LEGEND option commented out, I am guessing because you did not have a LEGEND1 statement.&lt;BR /&gt;&lt;BR /&gt;Consider this example &lt;A href="http://www2.sas.com/proceedings/forum2007/163-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/163-2007.pdf&lt;/A&gt; on page 2 with the use of the simple LEGEND option to place a legend on the plot.&lt;BR /&gt;&lt;BR /&gt;Then, look on page 3 at the use of the LEGEND1 statement and legend=legend1 option. You should get an idea of how to do what you want.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Sat, 04 Nov 2017 15:41:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410547#M14075</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-11-04T15:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Very Simple Legend?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410555#M14077</link>
      <description>&lt;P&gt;If you're just learning graphing in SAS I would strongly recommend learning SG procedures instead of GPLOT procedures.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is more on GPLOT currently - because it's really really old. SG is available in more versions of SAS, you have more control over your graphics and it produces much better quality graphics.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2017 16:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410555#M14077</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-04T16:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Very Simple Legend?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410569#M14078</link>
      <description>You'll need 9.2 or higher to run SGPLOT. I agree with Reeza that the SG procedures are easier to start with then the older SAS/Graph procedures.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Sat, 04 Nov 2017 17:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410569#M14078</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-11-04T17:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Very Simple Legend?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410581#M14079</link>
      <description>&lt;P&gt;Thanks, Cynthia.&amp;nbsp; I went through Wendi's paper and was able to come up with something that'll be good enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will definitely take yours and Reeza's advice and learn about SGPLOT!&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2017 19:25:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410581#M14079</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2017-11-04T19:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a Very Simple Legend?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410904#M14090</link>
      <description>&lt;P&gt;I often use title or footnote statements to 'fake' a legend, to get one exactly like I want it.&lt;/P&gt;
&lt;P&gt;In your case, you could use something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title8 c=blue "--- Placebo" c=red "&amp;nbsp; --- Study Drug";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 16:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-do-a-Very-Simple-Legend/m-p/410904#M14090</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2017-11-06T16:10:30Z</dc:date>
    </item>
  </channel>
</rss>

