<?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: How to suppress the duplicate legend values in keylegend statement using SGPLOT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-suppress-the-duplicate-legend-values-in-keylegend/m-p/731789#M227985</link>
    <description>&lt;P&gt;Maybe give the plots that you want to include in the legend a name and then only include those in the key legend instead?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FYI - this is a case where formatting the code for legibility really helps. Your exclude statement confuses me as there's no other reference to that item in the code.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274325"&gt;@ramtejdasari&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi , I am creating waterfall plot and a bar chart in one panel ,&amp;nbsp; where in both the plots the treatments are same for the legend. I don't want to duplicate the same treatments for the two plots in the legend. How can i suppress or exclude the duplicate treatments from the legend.&amp;nbsp; I am using below code to create the plots. Attached is the plot for reference&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=fin nowall noborder nocycleattrs;&lt;BR /&gt;format trtpn arm.;&lt;BR /&gt;styleattrs datacolors=(blue yellow green red purple) datacontrastcolors=(blue yellow green red purple) axisextent=data;&lt;BR /&gt;symbolchar name=mystar char='002a'x / voffset= -0.5 scale=7;&lt;BR /&gt;vbarparm category=usubjid response=chgsld / group=trtpn datalabel=chgsld dataskin=pressed&lt;BR /&gt;datalabelattrs=(size=8 weight=bold) clusterwidth=1;&lt;BR /&gt;vbarparm category=usubjid response=chgbm / group=trtpn datalabel=chgbm y2axis dataskin=pressed&lt;BR /&gt;/*fillattrs=(color= cxcfcf7f)*/;&lt;BR /&gt;scatter x=usubjid y=CRR / markerattrs=(symbol=mystar color= green size=3);&lt;BR /&gt;/* refline 20 -30 / lineattrs=(pattern=shortdash);*/&lt;BR /&gt;xaxis display=none colorbands=odd colorbandsattrs=(transparency=0.6);&lt;BR /&gt;yaxis label="Change from baseline in Total SLEDAI score" values=(40 to -40 by -10) offsetmax=0.55 labelpos=datacenter offsetmin=0;&lt;BR /&gt;y2axis label="Change from baseline in Biomarker" values=(90 to -90 by -15) offsetmin=0.5 offsetmax=0.02 labelpos=datacenter;&lt;BR /&gt;keylegend / exclude=("Change from Baseline") title='' border;&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Apr 2021 03:10:33 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-04-07T03:10:33Z</dc:date>
    <item>
      <title>How to suppress the duplicate legend values in keylegend statement using SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-suppress-the-duplicate-legend-values-in-keylegend/m-p/731783#M227980</link>
      <description>&lt;P&gt;Hi , I am creating waterfall plot and a bar chart in one panel ,&amp;nbsp; where in both the plots the treatments are same for the legend. I don't want to duplicate the same treatments for the two plots in the legend. How can i suppress or exclude the duplicate treatments from the legend.&amp;nbsp; I am using below code to create the plots. Attached is the plot for reference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=fin nowall noborder nocycleattrs;&lt;BR /&gt;format trtpn arm.;&lt;BR /&gt;styleattrs datacolors=(blue yellow green red purple) datacontrastcolors=(blue yellow green red purple) axisextent=data;&lt;BR /&gt;symbolchar name=mystar char='002a'x / voffset= -0.5 scale=7;&lt;BR /&gt;vbarparm category=usubjid response=chgsld / group=trtpn datalabel=chgsld dataskin=pressed&lt;BR /&gt;datalabelattrs=(size=8 weight=bold) clusterwidth=1;&lt;BR /&gt;vbarparm category=usubjid response=chgbm / group=trtpn datalabel=chgbm y2axis dataskin=pressed&lt;BR /&gt;/*fillattrs=(color= cxcfcf7f)*/;&lt;BR /&gt;scatter x=usubjid y=CRR / markerattrs=(symbol=mystar color= green size=3);&lt;BR /&gt;/* refline 20 -30 / lineattrs=(pattern=shortdash);*/&lt;BR /&gt;xaxis display=none colorbands=odd colorbandsattrs=(transparency=0.6);&lt;BR /&gt;yaxis label="Change from baseline in Total SLEDAI score" values=(40 to -40 by -10) offsetmax=0.55 labelpos=datacenter offsetmin=0;&lt;BR /&gt;y2axis label="Change from baseline in Biomarker" values=(90 to -90 by -15) offsetmin=0.5 offsetmax=0.02 labelpos=datacenter;&lt;BR /&gt;keylegend / exclude=("Change from Baseline") title='' border;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 01:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-suppress-the-duplicate-legend-values-in-keylegend/m-p/731783#M227980</guid>
      <dc:creator>ramtejdasari</dc:creator>
      <dc:date>2021-04-07T01:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to suppress the duplicate legend values in keylegend statement using SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-suppress-the-duplicate-legend-values-in-keylegend/m-p/731789#M227985</link>
      <description>&lt;P&gt;Maybe give the plots that you want to include in the legend a name and then only include those in the key legend instead?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FYI - this is a case where formatting the code for legibility really helps. Your exclude statement confuses me as there's no other reference to that item in the code.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274325"&gt;@ramtejdasari&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi , I am creating waterfall plot and a bar chart in one panel ,&amp;nbsp; where in both the plots the treatments are same for the legend. I don't want to duplicate the same treatments for the two plots in the legend. How can i suppress or exclude the duplicate treatments from the legend.&amp;nbsp; I am using below code to create the plots. Attached is the plot for reference&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=fin nowall noborder nocycleattrs;&lt;BR /&gt;format trtpn arm.;&lt;BR /&gt;styleattrs datacolors=(blue yellow green red purple) datacontrastcolors=(blue yellow green red purple) axisextent=data;&lt;BR /&gt;symbolchar name=mystar char='002a'x / voffset= -0.5 scale=7;&lt;BR /&gt;vbarparm category=usubjid response=chgsld / group=trtpn datalabel=chgsld dataskin=pressed&lt;BR /&gt;datalabelattrs=(size=8 weight=bold) clusterwidth=1;&lt;BR /&gt;vbarparm category=usubjid response=chgbm / group=trtpn datalabel=chgbm y2axis dataskin=pressed&lt;BR /&gt;/*fillattrs=(color= cxcfcf7f)*/;&lt;BR /&gt;scatter x=usubjid y=CRR / markerattrs=(symbol=mystar color= green size=3);&lt;BR /&gt;/* refline 20 -30 / lineattrs=(pattern=shortdash);*/&lt;BR /&gt;xaxis display=none colorbands=odd colorbandsattrs=(transparency=0.6);&lt;BR /&gt;yaxis label="Change from baseline in Total SLEDAI score" values=(40 to -40 by -10) offsetmax=0.55 labelpos=datacenter offsetmin=0;&lt;BR /&gt;y2axis label="Change from baseline in Biomarker" values=(90 to -90 by -15) offsetmin=0.5 offsetmax=0.02 labelpos=datacenter;&lt;BR /&gt;keylegend / exclude=("Change from Baseline") title='' border;&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 03:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-suppress-the-duplicate-legend-values-in-keylegend/m-p/731789#M227985</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-07T03:10:33Z</dc:date>
    </item>
  </channel>
</rss>

