<?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: Super impose two common discretelegend with slidebar in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226777#M8215</link>
    <description>&lt;P&gt;Use MERGEDLEGEND.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;&amp;nbsp; define statgraph mergedLegend;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; begingraph;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Layout overlay;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scatterplot x=age y=height / group=sex name='scatter';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; seriesplot x=age y=height / group=sex name='series' connectorder=xaxis;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mergedlegend 'scatter' 'series';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; endlayout;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; endgraph;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sgrender data=sashelp.class template=mergedLegend;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2015 16:59:45 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2015-09-22T16:59:45Z</dc:date>
    <item>
      <title>Super impose two common discretelegend with slidebar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226756#M8211</link>
      <description>&lt;P&gt;I am using following code. i wanted legend as in the attached figure but i am getting two different leagends separately. How can i get desired legend? I am using SAS 9.3.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/271i46D7742BF9BC2049/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="legend.PNG" title="legend.PNG" /&gt;Desired legend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=sashelp.class nway noprint;
    class sex age;
    var weight;
    output out=_td_mean 
                mean=mean
                lclm=low
                uclm=high;
run;

proc template;
    define statgraph highlow;
        begingraph;
            layout datapanel classvars=(sex)/columns=2
                                             columngutter=5
                                             headerlabeldisplay=value
                                             headerlabelattrs=(weight=bold)
                                             headerbackgroundcolor=lightgray
                                             columnaxisopts=(display=(label tickvalues ticks line)
                                                             label=("Age (Years)") labelattrs=(weight=bold)
                                                             linearopts=(tickvaluepriority=true tickvaluelist=(1 2 3 6 9 12)))
                                             rowaxisopts=(display=(label tickvalues ticks line)
                                                          label=("Mean Weight (kgs)") labelattrs=(weight=bold))
                                             ;
                layout prototype;
                    seriesplot x=age y=mean/group=trt01p lineattrs=(pattern=solid) name='p';
                    scatterplot x=age y=mean/group=trt01p
                             yerrorlower=low
                             yerrorupper=high
                             markerattrs=(symbol=circlefilled) name='s';
                    referenceline y=50 / LINEATTRS = (PATTERN = DOT);
                    referenceline y=150 / LINEATTRS = (PATTERN = DOT);
                endlayout;
                sidebar / align=bottom; 
                    discretelegend "s" "p" / border=false;
                  endsidebar;

            endlayout;
        endgraph;
    end;
run;
ods graphics on/noborder;
proc sgrender data=_td_mean template=highlow;
run;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226756#M8211</guid>
      <dc:creator>Rajaram</dc:creator>
      <dc:date>2015-09-22T15:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Super impose two common discretelegend with slidebar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226759#M8212</link>
      <description>&lt;P&gt;Using 9.2 I get a&amp;nbsp;single legend across the bottom. Adding Across=1 gets me a stacked legend at the bottom.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226759#M8212</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-09-22T15:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Super impose two common discretelegend with slidebar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226763#M8213</link>
      <description>&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/272i32CA5222B5AB1635/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="legend.PNG" title="legend.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks. &amp;nbsp;I tried that as well. I am getting like above.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226763#M8213</guid>
      <dc:creator>Rajaram</dc:creator>
      <dc:date>2015-09-22T15:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Super impose two common discretelegend with slidebar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226766#M8214</link>
      <description>&lt;P&gt;That sounds like the desired output. If you need different text then the LEGENDLABEL needs to be set for each of the plots.&lt;/P&gt;&lt;P&gt;The color and marker symbols would have to be set with the appropriate attributes for the plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 16:10:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226766#M8214</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-09-22T16:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Super impose two common discretelegend with slidebar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226777#M8215</link>
      <description>&lt;P&gt;Use MERGEDLEGEND.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;&amp;nbsp; define statgraph mergedLegend;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; begingraph;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Layout overlay;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scatterplot x=age y=height / group=sex name='scatter';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; seriesplot x=age y=height / group=sex name='series' connectorder=xaxis;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mergedlegend 'scatter' 'series';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; endlayout;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; endgraph;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sgrender data=sashelp.class template=mergedLegend;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 16:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226777#M8215</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-09-22T16:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Super impose two common discretelegend with slidebar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226874#M8219</link>
      <description>Thank you very much Sanjay.&lt;BR /&gt;&lt;BR /&gt;I choose GTL option. Since uneven axis values not working for SGPANEL with colaxis/rowaxis but working for SGPLOT with xaxis-yaxis. I also commented your post &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2012/04/30/axis-values-and-hint/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2012/04/30/axis-values-and-hint/&lt;/A&gt;</description>
      <pubDate>Wed, 23 Sep 2015 11:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Super-impose-two-common-discretelegend-with-slidebar/m-p/226874#M8219</guid>
      <dc:creator>Rajaram</dc:creator>
      <dc:date>2015-09-23T11:28:29Z</dc:date>
    </item>
  </channel>
</rss>

