<?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: plotting two variables in one bar in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348568#M12112</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Restructuring the data will get you want you want. You just need to make 2 observations for every observation in the input data.&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8237i78D27B74F34F71FA/image-size/original?v=1.0&amp;amp;px=-1" alt="sgplot_vbar.png" title="sgplot_vbar.png" border="0" /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Apr 2017 00:25:52 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2017-04-10T00:25:52Z</dc:date>
    <item>
      <title>plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348540#M12106</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In proc sgplot with either hbar or vbar statement, how to bring information from two variables to one bar. &amp;nbsp;For eg. var1=5 and var2=10. &amp;nbsp;Other obs could be var1=2 and var2=5. &amp;nbsp;The plot should show one&amp;nbsp;bar for each obs and each representaive bar should show informaion from both var1 (red) and var2 (blue). &amp;nbsp;The group won't work here.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 18:47:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348540#M12106</guid>
      <dc:creator>Ram_SAS</dc:creator>
      <dc:date>2017-04-09T18:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348544#M12107</link>
      <description>Basically need to show two 'response' values into one bar with different color.</description>
      <pubDate>Sun, 09 Apr 2017 19:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348544#M12107</guid>
      <dc:creator>Ram_SAS</dc:creator>
      <dc:date>2017-04-09T19:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348546#M12108</link>
      <description>&lt;P&gt;You'll need to restructure you data into how SAS expects it to be for a stacked bar chart.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This means combining the variables and included a new variable to denote the source/group.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 19:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348546#M12108</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-09T19:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348552#M12109</link>
      <description>&lt;P&gt;You mean create a new variable by adding var1+var2. &amp;nbsp;But in the vbar statement, what will be go in response=?? and group= combined?? groupdisplay=stack? &amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 19:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348552#M12109</guid>
      <dc:creator>Ram_SAS</dc:creator>
      <dc:date>2017-04-09T19:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348554#M12110</link>
      <description>&lt;P&gt;If you want sample code post sample data.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2017 20:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348554#M12110</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-09T20:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348556#M12111</link>
      <description>Here is a sample data. Need to show var1 and var2 of each customer in the same bar.&lt;BR /&gt;&lt;BR /&gt;data fitness;&lt;BR /&gt;input cus_id country $ var1 var2;&lt;BR /&gt;datalines;&lt;BR /&gt;102 Can 3.73 11.2&lt;BR /&gt;105 USA 20.3 9.1&lt;BR /&gt;123 USA 4.6 16.4&lt;BR /&gt;156 Can 8.1 0.3&lt;BR /&gt;177 USA 0.5 13.4&lt;BR /&gt;;&lt;BR /&gt;run;</description>
      <pubDate>Sun, 09 Apr 2017 20:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348556#M12111</guid>
      <dc:creator>Ram_SAS</dc:creator>
      <dc:date>2017-04-09T20:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348568#M12112</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Restructuring the data will get you want you want. You just need to make 2 observations for every observation in the input data.&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8237i78D27B74F34F71FA/image-size/original?v=1.0&amp;amp;px=-1" alt="sgplot_vbar.png" title="sgplot_vbar.png" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 00:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348568#M12112</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-04-10T00:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348574#M12113</link>
      <description>&lt;P&gt;If you want the bars stacked change GROUPDISPLAY from CLUSTER to STACK.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 02:45:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348574#M12113</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-10T02:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348579#M12114</link>
      <description>&lt;P&gt;Thanks Reeza and Cynthia..! &amp;nbsp;Did not get the restructuing part, it is clear now.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 02:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348579#M12114</guid>
      <dc:creator>Ram_SAS</dc:creator>
      <dc:date>2017-04-10T02:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: plotting two variables in one bar</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348580#M12115</link>
      <description>&lt;P&gt;The correct answer should be Cynthia's post.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 03:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/plotting-two-variables-in-one-bar/m-p/348580#M12115</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-10T03:12:09Z</dc:date>
    </item>
  </channel>
</rss>

