<?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: VBAR with 2 bars and three lines (separate the bars) in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450528#M29131</link>
    <description>&lt;P&gt;This task is a lot easier if you gather your Trans A/B variables in one variable Trans and create some categorical variable&amp;nbsp;AorB that has values&amp;nbsp; A/B.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use a single VBAR Statement and specify group=AorB and groupdisplay=cluster&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This link may be of help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2016/11/27/getting-started-sgplot-part-2-vbar/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2016/11/27/getting-started-sgplot-part-2-vbar/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2018 06:56:37 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-04-03T06:56:37Z</dc:date>
    <item>
      <title>VBAR with 2 bars and three lines (separate the bars)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450520#M29130</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a combo graph that has two bars and three lines, however the&amp;nbsp;second bar sits behind the first one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get them to sit side by side to each&amp;nbsp;other?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data test;
 Input WEEK_END_DT $ TransA TransB PCTA PCTB PCTC;
 Datalines;
A 5063 3487 0.170074793 0.133479212 0.282554088
B 8094 9028 0.146952298 0.097315235 0.270777721
C 9512 10226 0.144833102 0.095077215 0.282205541
D 11004 11326 0.163079597 0.107464086 0.328004634
E 10591 10351 0.171097567 0.112158341 0.370088312
F 14045 11853 0.166789031 0.113834383 0.371648951
G 14643 10257 0.158547224 0.113666708 0.363375492
H 15739 7427 0.157418355 0.124353109 0.36062151
I 16056 6942 0.156742205 0.126345609 0.353372359
J 15074 6714 0.145029987 0.115199731 0.346439628
K 15014 4723 0.136847725 0.11575052 0.325365114
L 13918 5926 0.142005567 0.113826324 0.339268335
M 14402 4526 0.132393263 0.111817638 0.319429741
N 12071 2903 0.129682074 0.113615828 0.314756587

RUN;



Proc SGPlot data=Test;
	Title "Overal Transfers";
	VBAR WEEK_END_DT / Response=TransA Fillattrs=(Color=BIBG ) groupdisplay=stack  Legendlabel='IIE Transfers';
	VBAR WEEK_END_DT / Response=TransB Fillattrs=(Color=VIPK )groupdisplay=stack Legendlabel='NON IIE Transfers';;

	VLine WEEK_END_DT / response=PCTA y2axis lineattrs=(color=darksalmon thickness=5) Legendlabel='Total Transfer %';
	VLine WEEK_END_DT / response=PCTB y2axis lineattrs=(color=Blue thickness=5) Legendlabel='NON IIETransfer %';
	VLine WEEK_END_DT / response=PCTC y2axis lineattrs=(color=Green thickness=5) Legendlabel='IIE Transfer %';
	Yaxis values=(0 to 20000 by 2000);
	y2axis values=(0 to .50 by .02) Label='Trans %';
	format PCTA PCTB PCTC Percent.;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What I get&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; What I would like.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph1.JPG" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19573i530123BF5573A238/image-size/small?v=v2&amp;amp;px=200" role="button" title="Graph1.JPG" alt="Graph1.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph2.JPG" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19574i61831605C4FB3B19/image-size/small?v=v2&amp;amp;px=200" role="button" title="Graph2.JPG" alt="Graph2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dean&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 04:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450520#M29130</guid>
      <dc:creator>DME790</dc:creator>
      <dc:date>2018-04-03T04:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: VBAR with 2 bars and three lines (separate the bars)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450528#M29131</link>
      <description>&lt;P&gt;This task is a lot easier if you gather your Trans A/B variables in one variable Trans and create some categorical variable&amp;nbsp;AorB that has values&amp;nbsp; A/B.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use a single VBAR Statement and specify group=AorB and groupdisplay=cluster&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This link may be of help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2016/11/27/getting-started-sgplot-part-2-vbar/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2016/11/27/getting-started-sgplot-part-2-vbar/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 06:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450528#M29131</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-04-03T06:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: VBAR with 2 bars and three lines (separate the bars)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450535#M29132</link>
      <description>&lt;P&gt;Something like this? Use VBARPARM instead of VBAR and SERIES instead of VLINE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data test;
 Input WEEK_END_DT$ Trans AorB$ PCTA PCTB PCTC;
 Datalines;
A 5063 A 0.170074793 0.133479212 0.282554088
A 3487 B 0.170074793 0.133479212 0.282554088
B 8094 A 0.146952298 0.097315235 0.270777721
B 9028 B 0.146952298 0.097315235 0.270777721
C 9512 A 0.144833102 0.095077215 0.282205541
C 10226 B 0.144833102 0.095077215 0.282205541
D 11004 A 0.163079597 0.107464086 0.328004634
D 11326 B 0.163079597 0.107464086 0.328004634
E 10591 A 0.171097567 0.112158341 0.370088312
E 10351 B 0.171097567 0.112158341 0.370088312
F 14045 A 0.166789031 0.113834383 0.371648951
F 11853 B 0.166789031 0.113834383 0.371648951
G 14643 A 0.158547224 0.113666708 0.363375492
G 10257 B 0.158547224 0.113666708 0.363375492
H 15739 A 0.157418355 0.124353109 0.36062151
H 7427 B 0.157418355 0.124353109 0.36062151
I 16056 A 0.156742205 0.126345609 0.353372359
I 6942 B 0.156742205 0.126345609 0.353372359
J 15074 A 0.145029987 0.115199731 0.346439628
J 6714 B 0.145029987 0.115199731 0.346439628
K 15014 A 0.136847725 0.11575052 0.325365114
K 4723 B 0.136847725 0.11575052 0.325365114
L 13918 A 0.142005567 0.113826324 0.339268335
L 5926 B 0.142005567 0.113826324 0.339268335
M 14402 A 0.132393263 0.111817638 0.319429741
M 4526 B 0.132393263 0.111817638 0.319429741
N 12071 A 0.129682074 0.113615828 0.314756587
N 2903 B 0.129682074 0.113615828 0.314756587
RUN;

Title "Overal Transfers";
proc sgplot data=test noborder;
    vbarparm category=WEEK_END_DT response=Trans / group=AorB groupdisplay=cluster baselineattrs=(thickness=0) name='a';
    series x=WEEK_END_DT y=PCTA / y2axis lineattrs=(color=darksalmon thickness=5) name='b';
    series x=WEEK_END_DT y=PCTB / y2axis lineattrs=(color=Blue thickness=5) name='c';
    series x=WEEK_END_DT y=PCTC / y2axis lineattrs=(color=Green thickness=5) name='d';
    xaxis discreteorder=data display=(noline nolabel noticks);
    yaxis display=(noline noticks) grid values=(0 to 20000 by 2000) offsetmin=0;
    y2axis display=(noline noticks) values=(0 to .40 by .04) Label='Trans %' offsetmin=0;
    keylegend 'a' 'b' 'c' 'd';
    format PCTA PCTB PCTC Percent.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Apr 2018 07:41:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450535#M29132</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-04-03T07:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: VBAR with 2 bars and three lines (separate the bars)</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450907#M29146</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works a treat.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dean&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 22:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/VBAR-with-2-bars-and-three-lines-separate-the-bars/m-p/450907#M29146</guid>
      <dc:creator>DME790</dc:creator>
      <dc:date>2018-04-03T22:50:54Z</dc:date>
    </item>
  </channel>
</rss>

