<?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: the legend in sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192066#M7116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, insets do not take plot references. They are for adding additional textual information (either as prose or a table) to the inside of a plot area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your code further, let me make another recommendation. You have one plot with no group variable and one reference line (with a label to identify it). Having a legend might not benefit you that much. It seems that having your graph title mention something about "plotting VO2" would take care of the scatter plot description and adding a footnote for "EX = exercise" would take care of the reference line label. That way, you maximize the plot area for just the data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Mar 2014 22:34:28 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2014-03-03T22:34:28Z</dc:date>
    <item>
      <title>the legend in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192063#M7113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am producing scatter plots with sgplot, and I am placing a vertical reference line on the graph.&amp;nbsp; In the legend, the symbol and legend label correctly appear for the scatter plots (a red dot followed by VO2), but I would like to hide the symbol for the vertical reference line.&amp;nbsp; Currently my legend for the vertical line shows a dotted black line followed by EX = Exercise, but I want to hide the dotted black line.&amp;nbsp; Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=cpet15;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; keylegend "vo2" "ex" / border location = inside position = topleft down=4 opaque;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis label="Time (min)" /*min=0 max=1 */;&lt;/P&gt;&lt;P&gt;&amp;nbsp; yaxis label="VO2 and VCO2 (ml/min)" /*min=0 max=1 */;&lt;/P&gt;&lt;P&gt;&amp;nbsp; y2axis label="Work (Watts)" min=0 max=300 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*VO2 vs time*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=t15_c_min y=ex_vo2 / LEGENDLABEL = "VO2" name = "vo2" MARKERATTRS= (symbol=circlefilled color=red size=6pt);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; /*vertical reference line*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; refline 5&amp;nbsp; / axis=x label = "EX" labelloc = inside labelpos = min &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;legendlabel = "EX = Exercise" name = "ex" lineattrs = (pattern=4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 21:00:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192063#M7113</guid>
      <dc:creator>rileynic</dc:creator>
      <dc:date>2014-03-03T21:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: the legend in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192064#M7114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of putting the reference line in the legend, what if you used the INSET statement to add this information to the graph? You can also position the inset information, or let it automatically move to avoid collisions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSET "EX = Exercise";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 21:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192064#M7114</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-03-03T21:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: the legend in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192065#M7115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that seems to have some potential...I will play with it...do you think I can that red dot and VO2 from the scatterplot in the inset box too?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your quick response!&lt;/P&gt;&lt;P&gt;nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 22:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192065#M7115</guid>
      <dc:creator>rileynic</dc:creator>
      <dc:date>2014-03-03T22:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: the legend in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192066#M7116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, insets do not take plot references. They are for adding additional textual information (either as prose or a table) to the inside of a plot area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your code further, let me make another recommendation. You have one plot with no group variable and one reference line (with a label to identify it). Having a legend might not benefit you that much. It seems that having your graph title mention something about "plotting VO2" would take care of the scatter plot description and adding a footnote for "EX = exercise" would take care of the reference line label. That way, you maximize the plot area for just the data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 22:34:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192066#M7116</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-03-03T22:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: the legend in sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192067#M7117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually, i have 3 scatter plots on this graph and 4 vertical reference lines, so I do need a legend...but I am happy that you have introduced me to the inset statement. I now have 2 options:&lt;/P&gt;&lt;P&gt;- I can include the legend values and symbols for the vertical reference lines in the legend&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;- I can add the legend values without their symbols to the graph using the inset statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this has been very helpful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 02:48:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/the-legend-in-sgplot/m-p/192067#M7117</guid>
      <dc:creator>rileynic</dc:creator>
      <dc:date>2014-03-04T02:48:41Z</dc:date>
    </item>
  </channel>
</rss>

