<?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 side by side in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12513#M222</link>
    <description>What version of SAS are you using?</description>
    <pubDate>Wed, 06 Oct 2010 02:46:35 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2010-10-06T02:46:35Z</dc:date>
    <item>
      <title>vbar side by side</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12511#M220</link>
      <description>I have a dataset like this:&lt;BR /&gt;
           green  red&lt;BR /&gt;
day1     4        5&lt;BR /&gt;
day2     7        8&lt;BR /&gt;
day3     1        2&lt;BR /&gt;
....&lt;BR /&gt;
&lt;BR /&gt;
I want to plot a vbar chart.&lt;BR /&gt;
the x-axis is the day1, day2, ...&lt;BR /&gt;
the y-axis is the number of green or red.&lt;BR /&gt;
&lt;BR /&gt;
Is it possible to put green and red bars side by side on each day?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 05 Oct 2010 21:23:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12511#M220</guid>
      <dc:creator>neilxu</dc:creator>
      <dc:date>2010-10-05T21:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: vbar side by side</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12512#M221</link>
      <description>With VBAR, consider GROUP= and SUBGROUP= options.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
gchart vbar group subgroup site:sas.com</description>
      <pubDate>Wed, 06 Oct 2010 00:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12512#M221</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-10-06T00:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: vbar side by side</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12513#M222</link>
      <description>What version of SAS are you using?</description>
      <pubDate>Wed, 06 Oct 2010 02:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12513#M222</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2010-10-06T02:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: vbar side by side</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12514#M223</link>
      <description>This should get you pointed in the right direction...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data foo;&lt;BR /&gt;
input day colorvar $ 3-3 value;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1 A 4&lt;BR /&gt;
1 B 5&lt;BR /&gt;
2 A 7&lt;BR /&gt;
2 B 8&lt;BR /&gt;
3 A 1&lt;BR /&gt;
3 B 2&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
pattern1 v=s c=green;&lt;BR /&gt;
pattern2 v=s c=red;&lt;BR /&gt;
&lt;BR /&gt;
axis1 label=none order=(0 to 10 by 2) minor=none offset=(0,0);&lt;BR /&gt;
axis2 label=('Day') offset=(3,3);&lt;BR /&gt;
axis3 label=none value=none;&lt;BR /&gt;
&lt;BR /&gt;
legend1 label=(position=top 'Legend:') position=(right middle) &lt;BR /&gt;
 across=1 shape=bar(.15in,.15in) offset=(-5,0);&lt;BR /&gt;
&lt;BR /&gt;
title1 "Here is your graph...";&lt;BR /&gt;
proc gchart data=foo;&lt;BR /&gt;
vbar colorvar / discrete type=sum sumvar=value&lt;BR /&gt;
 group=day subgroup=colorvar&lt;BR /&gt;
 space=0 raxis=axis1 gaxis=axis2 maxis=axis3 legend=legend1&lt;BR /&gt;
 autoref cref=graydd clipref&lt;BR /&gt;
 ;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 06 Oct 2010 12:33:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12514#M223</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-10-06T12:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: vbar side by side</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12515#M224</link>
      <description>thank you Robert.&lt;BR /&gt;
&lt;BR /&gt;
I was thinking about changing the dataset layout. It looks like I have to do this first then use vbar to plot.&lt;BR /&gt;
&lt;BR /&gt;
thanks for the code, very very helpful.</description>
      <pubDate>Wed, 06 Oct 2010 13:33:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12515#M224</guid>
      <dc:creator>neilxu</dc:creator>
      <dc:date>2010-10-06T13:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: vbar side by side</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12516#M225</link>
      <description>Currently the x-axis is day, can I sum the value in the same month and output, so the x-axis is month/year?&lt;BR /&gt;
&lt;BR /&gt;
thanks

I added midpoints "by month" and format days monyy. it looks like it works.&lt;BR /&gt;
&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: neilxu</description>
      <pubDate>Wed, 06 Oct 2010 15:22:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12516#M225</guid>
      <dc:creator>neilxu</dc:creator>
      <dc:date>2010-10-06T15:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: vbar side by side</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12517#M226</link>
      <description>Use the INTNX function in a DATA step to derive a "month start date" and then apply a SAS output FORMAT to display month/year as desired on the X-axis.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search arguments, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
intnx function site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
date format month year site:sas.com</description>
      <pubDate>Wed, 06 Oct 2010 15:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12517#M226</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-10-06T15:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: vbar side by side</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12518#M227</link>
      <description>Thanks for your help.</description>
      <pubDate>Wed, 06 Oct 2010 16:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/vbar-side-by-side/m-p/12518#M227</guid>
      <dc:creator>neilxu</dc:creator>
      <dc:date>2010-10-06T16:03:05Z</dc:date>
    </item>
  </channel>
</rss>

