<?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: Grouped simulated bar graphs in proc gplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127846#M4962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I transposed my data, but the two bars are still laying on top of one another instead of beside each other.&amp;nbsp; Unfortunately I cannot run the example you gave due to the different computers I have available to me, but I noticed the example did not use proc gplot.&amp;nbsp; Is it able to be done using proc gplot (since everything with my graph is the way I want except for the bars not being beside each other) either with the original data or transposed data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Danielle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Oct 2013 12:29:47 GMT</pubDate>
    <dc:creator>dwallack216</dc:creator>
    <dc:date>2013-10-30T12:29:47Z</dc:date>
    <item>
      <title>Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127842#M4958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using proc gplot, I currently have scatter plots and simulated bar graphs on the same graph.&amp;nbsp; The simulated bar graph has 2 groupings.&amp;nbsp; However, the outputted graph gives the simulated bars laying on top of one another.&amp;nbsp; Is there anyway I can get grouped simulated bar graphs that instead lay side by side?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 20:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127842#M4958</guid>
      <dc:creator>dwallack216</dc:creator>
      <dc:date>2013-10-29T20:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127843#M4959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of SAS do you have?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 20:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127843#M4959</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2013-10-29T20:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127844#M4960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Version 9.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 20:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127844#M4960</guid>
      <dc:creator>dwallack216</dc:creator>
      <dc:date>2013-10-29T20:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127845#M4961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For SAS 9.2, you will need to transpose your data so that the two group values are in their own columns. Then, just modify the code below, and you will get your bar-scatter overlay. Run this example to see if this is what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc template;&lt;/P&gt;&lt;P&gt;define statgraph bar_scatter;&lt;/P&gt;&lt;P&gt;begingraph;&lt;/P&gt;&lt;P&gt;&amp;nbsp; layout overlay;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; barchart x=age y=height / stat=mean discreteoffset=-0.2 barwidth=0.4 fillattrs=graphdata1 name="a";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; barchart x=age y=weight / stat=mean discreteoffset=0.2 barwidth=0.4 fillattrs=graphdata2 name="b";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; scatterplot x=age y=height / discreteoffset=-0.2 markerattrs=graphdata1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; scatterplot x=age y=weight / discreteoffset=0.2 markerattrs=graphdata2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; discretelegend "a" "b";&lt;/P&gt;&lt;P&gt;&amp;nbsp; endlayout;&lt;/P&gt;&lt;P&gt;endgraph;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgrender data=sashelp.class template=bar_scatter;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 21:14:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127845#M4961</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2013-10-29T21:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127846#M4962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I transposed my data, but the two bars are still laying on top of one another instead of beside each other.&amp;nbsp; Unfortunately I cannot run the example you gave due to the different computers I have available to me, but I noticed the example did not use proc gplot.&amp;nbsp; Is it able to be done using proc gplot (since everything with my graph is the way I want except for the bars not being beside each other) either with the original data or transposed data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Danielle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 12:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127846#M4962</guid>
      <dc:creator>dwallack216</dc:creator>
      <dc:date>2013-10-30T12:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127847#M4963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It all depends on exactly how your data is set up...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming it's set up something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data foo;&lt;/P&gt;&lt;P&gt;x=1; y1=5; y2=3; output;&lt;/P&gt;&lt;P&gt;x=2; y1=6; y2=3.5; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you're plotting it something like this (using wide gplot 'needles' to simulate bars, and the ones with the exact same x-coordinate are overlapping since they're in the exact same location)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;symbol1 value=none interpol=needle width=15;&lt;/P&gt;&lt;P&gt;axis1 order=(0 to 3 by 1) minor=none;&lt;/P&gt;&lt;P&gt;proc gplot data=foo;&lt;/P&gt;&lt;P&gt;plot y1*x y2*x / overlay vzero haxis=axis1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you could modify your data by outputting 2 observations for each 1 observation in the original data, and apply a slight offset to the x-coordinate for each bar (a little to the left for one, and a little to the right for the other).&amp;nbsp; The code could be something like this (but as I mentioned before, it all depends on exactly how your data is set up)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data foo_mod; set foo;&lt;/P&gt;&lt;P&gt;x_mod=x-.04; colorvar=1; y_mod=y1; output;&lt;/P&gt;&lt;P&gt;x_mod=x+.04; colorvar=2; y_mod=y2; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc gplot data=foo_mod;&lt;/P&gt;&lt;P&gt;plot y_mod*x_mod=colorvar / vzero haxis=axis1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the graphs for 'before' and 'after' ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="foo1.png" class="jive-image-thumbnail jive-image" height="358" src="https://communities.sas.com/legacyfs/online/4467_foo1.png" width="622" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="foo2.png" class="jive-image-thumbnail jive-image" height="366" src="https://communities.sas.com/legacyfs/online/4469_foo2.png" width="617" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 12:48:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127847#M4963</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-10-30T12:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127848#M4964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been following your website and using your fantastic code for a while, and I enjoyed the every bit of it, Thank you very much.&lt;/P&gt;&lt;P&gt;I have an off topic question for you and other SAS/Graph experts: Is SAS GTL to replace SAS/Graph? Is this where SAS is heading to? GTL comes with Base, so users do not have to pay additional for GRAPH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 14:43:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127848#M4964</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-10-30T14:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127849#M4965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I will let one of the GTL managers field that question (perhaps Sanjay?)...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 14:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127849#M4965</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-10-30T14:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127850#M4966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS/GRAPH is not being replaced.&amp;nbsp; It continues to be supported and enhanced.&amp;nbsp; GTL and SG procedures are new additions to the tools available in SAS for creating graphs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 16:00:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127850#M4966</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-10-30T16:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127851#M4967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I offset the x-variables, and it worked like a charm! The only issue I'm having now is for some reason, the x-axis tick marks are not even remotely close to where the actual bars are.&amp;nbsp; My x-axis should have 12 tick marks.&amp;nbsp; Instead, it is only showing 6 of them, so my bars look like they are being compressed in between tick marks 2 and 5.&amp;nbsp; Is this due to offsetting the x-variables? Or could something else be wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Danielle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 17:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127851#M4967</guid>
      <dc:creator>dwallack216</dc:creator>
      <dc:date>2013-10-30T17:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127852#M4968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would need to see your data, and whether or not you have formats assigned to the x values, and what (if any) axis statement you're using for your x-axis, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if your X values are date values (using date formats) and you're using default x-axis (rather than using an axis statement with hardcoded ticks via the order=), etc, etc.&amp;nbsp; With numeric values, the x-axis will default to "round" tickmarks, and if the x-axis has dates then it will pick tickmarks at the beginning of year, month, etc if it can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds like you'll just need to override the default tickmark values ... but I'd need to know what kind of values/formats/etc you're working with in order to provide you with some sample code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 17:56:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127852#M4968</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2013-10-30T17:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped simulated bar graphs in proc gplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127853#M4969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it to work! My graph looks great now! Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Oct 2013 21:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Grouped-simulated-bar-graphs-in-proc-gplot/m-p/127853#M4969</guid>
      <dc:creator>dwallack216</dc:creator>
      <dc:date>2013-10-30T21:42:42Z</dc:date>
    </item>
  </channel>
</rss>

