<?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, with a BY group, ODS PDF, can I extract the legend to a separate page? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683714#M24454</link>
    <description>&lt;P&gt;Since you in effect one "plot" that is the legend and then the actual plots I would suggest creating an annotate data set and displaying that for the legend and then removing legends from the individual plots. Then just display the annotate set results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you data changes much this can be a bit of a chore and you might want to consider using DATTRMAP or RATTRMAP data sets to make things more consistent in the graphs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind of generic answer to a generic question. Examples of your SGPLOT code might let someone provide a bit more detailed suggestion, and better would be to provide some example data that behaves like your data set to demonstrate the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes an SGPLOT by group may be handled a bit nice with&amp;nbsp; SGPANEL and a Panelby statement.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Sep 2020 16:56:22 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-09-14T16:56:22Z</dc:date>
    <item>
      <title>SGPLOT, with a BY group, ODS PDF, can I extract the legend to a separate page?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683539#M24449</link>
      <description>&lt;P&gt;SAS 9.4M6 SGPlot&lt;/P&gt;
&lt;P&gt;Am outputting the following to ODS PDF:&lt;/P&gt;
&lt;P&gt;SGPLOT, a BY Group, and multiple SERIES statements.&lt;/P&gt;
&lt;P&gt;Some of the legend is&amp;nbsp;AUTOLEGEND generated. Some is LEGENDITEM generated.&lt;/P&gt;
&lt;P&gt;The legend is&amp;nbsp;necessarily large, and has taken over the page.&lt;/P&gt;
&lt;P&gt;I would prefer to:&lt;/P&gt;
&lt;P&gt;(1) remove the legend from each page, and&lt;/P&gt;
&lt;P&gt;(2)&amp;nbsp;print one legend at the front of the PDF.&lt;/P&gt;
&lt;P&gt;Is there a way to do this?&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 21:55:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683539#M24449</guid>
      <dc:creator>MelissaM</dc:creator>
      <dc:date>2020-09-13T21:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT, with a BY group, ODS PDF, can I extract the legend to a separate page?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683714#M24454</link>
      <description>&lt;P&gt;Since you in effect one "plot" that is the legend and then the actual plots I would suggest creating an annotate data set and displaying that for the legend and then removing legends from the individual plots. Then just display the annotate set results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you data changes much this can be a bit of a chore and you might want to consider using DATTRMAP or RATTRMAP data sets to make things more consistent in the graphs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind of generic answer to a generic question. Examples of your SGPLOT code might let someone provide a bit more detailed suggestion, and better would be to provide some example data that behaves like your data set to demonstrate the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes an SGPLOT by group may be handled a bit nice with&amp;nbsp; SGPANEL and a Panelby statement.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 16:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683714#M24454</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-14T16:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT, with a BY group, ODS PDF, can I extract the legend to a separate page?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683780#M24457</link>
      <description>&lt;LI-CODE lang="markup"&gt;proc sort data=sashelp.class out=class;by sex;run;
proc sgplot data = class ;
    by sex;
    scatter x = height y = weight / name = 'A' LEGENDLABEL="Height";
    scatter x = age y = weight / name = 'B' LEGENDLABEL="Weight";

legenditem name="C" type=marker / markerattrs=(symbol=TriangleLeftFilled size=8pt Color=red)  
				label="Misc Legend Item #1";
legenditem name="D" type=marker / markerattrs=(symbol=TriangleRightFilled size=8pt color=blue)  
				label="Misc Legend Item #2";
legenditem name="E" type=text / text="SUBJ" 
				label="Misc Legend Item #3";

  	keylegend 'A' 'B' 'C' 'D'  'E' / position = e;
title;footnote;
run;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 14 Sep 2020 21:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683780#M24457</guid>
      <dc:creator>MelissaM</dc:creator>
      <dc:date>2020-09-14T21:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: SGPLOT, with a BY group, ODS PDF, can I extract the legend to a separate page?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683781#M24458</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; First, Thank you for the response. Admittedly I shy away from annotate and any attrmaps. But I did try them both, along with SGPANEL, and am not grasping how they'd work. Need further guidance. So I did "the right thing" and attached code example, as well as what I'm looking to achieve (in a picture). Would much appreciate any response that does not require me to go back and update things manually with revised data, later.&lt;BR /&gt;Again, thank you.</description>
      <pubDate>Mon, 14 Sep 2020 21:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/SGPLOT-with-a-BY-group-ODS-PDF-can-I-extract-the-legend-to-a/m-p/683781#M24458</guid>
      <dc:creator>MelissaM</dc:creator>
      <dc:date>2020-09-14T21:20:45Z</dc:date>
    </item>
  </channel>
</rss>

