<?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 vbar/vline and nomissinggroup? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773066#M22123</link>
    <description>&lt;P&gt;And here is the result. The graphs are nice but not the legend. (&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="de" data-phrase-index="0"&gt;&lt;SPAN&gt;Please disregard the color selection.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="de" data-phrase-index="1"&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;/P&gt;</description>
    <pubDate>Fri, 08 Oct 2021 15:58:33 GMT</pubDate>
    <dc:creator>AntjeWestphal</dc:creator>
    <dc:date>2021-10-08T15:58:33Z</dc:date>
    <item>
      <title>sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773055#M22117</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;My &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="de" data-phrase-index="0"&gt;&lt;SPAN&gt;shortened&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; sgplot-Syntax is like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;vbar  week / response=blood_donation group=Product nomissinggroup;
vline week / response=blood_issued group=Product nomissinggroup;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and I have to exclude&lt;SPAN class="markedContent"&gt; observations with missing values for the group variable to have a nice legend. Nomissinggroup doesn't seem to work in that way.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="markedContent"&gt;Is there a simple way to exclude missing value groups?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 15:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773055#M22117</guid>
      <dc:creator>AntjeWestphal</dc:creator>
      <dc:date>2021-10-08T15:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773057#M22118</link>
      <description>Usually missing values are excluded by default, can you provide an example of how your missing is shown.</description>
      <pubDate>Fri, 08 Oct 2021 15:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773057#M22118</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-08T15:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773059#M22119</link>
      <description>&lt;P&gt;Could you add a statement like this after the `VBAR` and `VLINE`?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where product ~= "";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Assuming `product` is a character variable.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 15:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773059#M22119</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2021-10-08T15:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773063#M22120</link>
      <description>Try suppressing at first one of the 2 plots. To see how it behaves for only one plot. Perhaps nonmissinggroups are not consistent for both response variables.</description>
      <pubDate>Fri, 08 Oct 2021 15:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773063#M22120</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2021-10-08T15:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773064#M22121</link>
      <description>&lt;P&gt;Here are the data. It's a mixture out of 3 different sources.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 15:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773064#M22121</guid>
      <dc:creator>AntjeWestphal</dc:creator>
      <dc:date>2021-10-08T15:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773065#M22122</link>
      <description>&lt;P&gt;This is the original code:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=Ges;
title height=15pt 'Pool-TK und Apherese-TK';
  xaxis labelattrs=(size=15);
  yaxis label='TK-Herstellung und -Abgabe an Patienten' values=(0 to 100 by 10) offsetmin=0 valueattrs=(size=13) labelattrs=(size=15);
  y2axis label='VB-Spenden' values=(0 to 400 by 40) offsetmin=0 valueattrs=(size=13) labelattrs=(size=15);
  vbar KW2 / response=Herst group=Produkt transparency=0.2 legendlabel='Herstellung';
  vline KW2 / response=AusgTK group=Produkt lineattrs=(thickness=2) legendlabel='TK-Ausgaben';
  vbar KW2 / response=SpendVB group=Produkt transparency=0.4 nooutline legendlabel='VB-Spenden' barwidth=0.4 fillattrs=(color=grey) y2axis;
  keylegend / noborder valueattrs=(size=12);
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Oct 2021 15:56:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773065#M22122</guid>
      <dc:creator>AntjeWestphal</dc:creator>
      <dc:date>2021-10-08T15:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773066#M22123</link>
      <description>&lt;P&gt;And here is the result. The graphs are nice but not the legend. (&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="de" data-phrase-index="0"&gt;&lt;SPAN&gt;Please disregard the color selection.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="de" data-phrase-index="1"&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 15:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773066#M22123</guid>
      <dc:creator>AntjeWestphal</dc:creator>
      <dc:date>2021-10-08T15:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773125#M22124</link>
      <description>&lt;P&gt;Hallo&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40220"&gt;@AntjeWestphal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about this legend?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="keylegend.png" style="width: 412px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64541i5E1D2F7D7FB30146/image-size/large?v=v2&amp;amp;px=999" role="button" title="keylegend.png" alt="keylegend.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Obtained with this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=Ges;
title height=15pt 'Pool-TK und Apherese-TK';
  xaxis labelattrs=(size=15);
  yaxis label='TK-Herstellung und -Abgabe an Patienten' values=(0 to 100 by 10) offsetmin=0 valueattrs=(size=13) labelattrs=(size=15);
  y2axis label='VB-Spenden' values=(0 to 400 by 40) offsetmin=0 valueattrs=(size=13) labelattrs=(size=15);
  vbar KW2 / name='B1' response=Herst group=Produkt transparency=0.2;
  vline KW2 / name='LP' response=AusgTK group=Produkt lineattrs=(thickness=2);
  vbar KW2 / name='B2' response=SpendVB group=Produkt transparency=0.4 nooutline barwidth=0.4 fillattrs=(color=grey) y2axis;
  keylegend 'B1' / noborder valueattrs=(size=12) exclude=('TK'             'VB') position=bottomleft;
  keylegend 'LP' / noborder valueattrs=(size=12) exclude=(     'TKP' 'TKZ' 'VB') position=bottom;
  keylegend 'B2' / noborder valueattrs=(size=12) exclude=('TK' 'TKP' 'TKZ'     ) position=bottomright;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I added the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n0p7vdd69sgf3wn1479qxqxuryrt.htm#p1kiiynz0gzidxn16dsf62msnl4tz5" target="_blank" rel="noopener"&gt;NAME= option&lt;/A&gt; to the plots and separate KEYLEGEND statements for each plot, referring to the (arbitrary) names, using the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p0xmbppzx71smbn1203aaif96z86.htm#p0fisheopcvwo0n1burtm49ebr6h" target="_blank" rel="noopener"&gt;EXCLUDE= option&lt;/A&gt; to remove the unwanted items and the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p0xmbppzx71smbn1203aaif96z86.htm#p18zrxvo9ttjnqn1ap4qs65w2or3" target="_blank" rel="noopener"&gt;POSITION= option&lt;/A&gt; for the positioning. Moreover, I omitted the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n0p7vdd69sgf3wn1479qxqxuryrt.htm#n00n0m8zg78ap9n18sq3wtz0a6qq" target="_blank" rel="noopener"&gt;LEGENDLABEL= options&lt;/A&gt;&amp;nbsp;because they have "&lt;SPAN&gt;no effect if you also specify the GROUP= option in the same plot statement" (according to the documentation).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 18:54:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773125#M22124</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-10-08T18:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: sgplot with vbar/vline and nomissinggroup?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773336#M22133</link>
      <description>&lt;P&gt;Hi Reinhard, perfect, that works great! Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also thanks to the other answerers!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 09:57:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/sgplot-with-vbar-vline-and-nomissinggroup/m-p/773336#M22133</guid>
      <dc:creator>AntjeWestphal</dc:creator>
      <dc:date>2021-10-11T09:57:03Z</dc:date>
    </item>
  </channel>
</rss>

