<?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 sgplot legend with lines and markers in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422898#M14566</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Wondering&amp;nbsp;is it possible to get the names just below the respective panel.&amp;nbsp; Thanks.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dummy;
	set sashelp.class;
	do day=1 to 10;
		n=ranuni(50)+20  ;
		output;
	end;
run;

proc sgpanel data=dummy;  
	panelby sex /layout=columnlattice  uniscale=all  novarname colheaderpos=bottom ;
	series x=day y=n/group=name markers name="name"
		lineattrs=(thickness=1) markerattrs=(size=6) attrid=subjid;
	colaxis integer label="Day";
	rowaxis label="n";
	keylegend "name"/ title ="Name";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17452i27334075B631FE35/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel1.png" alt="SGPanel1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2017 21:51:28 GMT</pubDate>
    <dc:creator>Ram_SAS</dc:creator>
    <dc:date>2017-12-20T21:51:28Z</dc:date>
    <item>
      <title>sgplot legend with lines and markers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422898#M14566</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Wondering&amp;nbsp;is it possible to get the names just below the respective panel.&amp;nbsp; Thanks.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dummy;
	set sashelp.class;
	do day=1 to 10;
		n=ranuni(50)+20  ;
		output;
	end;
run;

proc sgpanel data=dummy;  
	panelby sex /layout=columnlattice  uniscale=all  novarname colheaderpos=bottom ;
	series x=day y=n/group=name markers name="name"
		lineattrs=(thickness=1) markerattrs=(size=6) attrid=subjid;
	colaxis integer label="Day";
	rowaxis label="n";
	keylegend "name"/ title ="Name";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17452i27334075B631FE35/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel1.png" alt="SGPanel1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 21:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422898#M14566</guid>
      <dc:creator>Ram_SAS</dc:creator>
      <dc:date>2017-12-20T21:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot legend with lines and markers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422899#M14567</link>
      <description>&lt;P&gt;Do you mean a separate legend with different values for female and male? If the&amp;nbsp;Legend is more important than two side-by-side graphs then &amp;nbsp;easiest would be Proc SGPLOT and by sex:&lt;/P&gt;
&lt;PRE&gt;proc sort data= dummy;
by sex;
run;

proc sgplot data=dummy;  
   by sex;
	series x=day y=n/group=name markers name="name"
		lineattrs=(thickness=1) markerattrs=(size=6) attrid=subjid;
	keylegend "name"/ title ="Name";
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 22:02:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422899#M14567</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-20T22:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot legend with lines and markers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422901#M14568</link>
      <description>&lt;P&gt;Yes. but that gives&amp;nbsp; two separate images.&amp;nbsp; I like to have both side by side on the same page.&amp;nbsp; Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 22:06:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422901#M14568</guid>
      <dc:creator>Ram_SAS</dc:creator>
      <dc:date>2017-12-20T22:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot legend with lines and markers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422902#M14569</link>
      <description>&lt;P&gt;No.&amp;nbsp; With SGPANEL, the legend can only be outside the cell grid.&amp;nbsp; If you want&amp;nbsp;two legends, one in each cell, you would have to construct the 2-cell LATTICE yourself using GTL LAYOUT LATTICE.&lt;/P&gt;
&lt;P&gt;Getting Started example:&amp;nbsp;&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2013/02/12/gtl-layouts/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2013/02/12/gtl-layouts/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 22:19:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422902#M14569</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-12-20T22:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot legend with lines and markers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422907#M14570</link>
      <description>&lt;P&gt;You could ODS LAYOUT to put the SGPLOT output side-by-side on the page.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 22:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422907#M14570</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-12-20T22:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot legend with lines and markers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422917#M14571</link>
      <description>&lt;P&gt;Need to learn GTL more in detail.&amp;nbsp; Tried ODS layout earlier, but did not work well.&amp;nbsp; Could you please provide&amp;nbsp;some sample code for&amp;nbsp;ODS layout.&amp;nbsp; What about proc gslide and proc greplay?&amp;nbsp;&amp;nbsp;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ram&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 00:15:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422917#M14571</guid>
      <dc:creator>Ram_SAS</dc:creator>
      <dc:date>2017-12-21T00:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot legend with lines and markers</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422932#M14572</link>
      <description>&lt;P&gt;If your graph is going to be as busy as the one you posted I would recommend an alternative. Add labels at the end or beginning of each series. Possibly both and have some displayed on either side to help with readability. Otherwise practically trying to read that won't work. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 02:08:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-legend-with-lines-and-markers/m-p/422932#M14572</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-21T02:08:35Z</dc:date>
    </item>
  </channel>
</rss>

