<?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: Non-unified axis (different offsets) for 2 layouts with discrete axis (barcharts) GTL in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244447#M8856</link>
    <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the quick reply, your solution works but I need something which will work with my approach, I have very "big" macro and it will consume a huge amount of time to rewrite using your approach&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2016 15:13:41 GMT</pubDate>
    <dc:creator>sspkmnd</dc:creator>
    <dc:date>2016-01-19T15:13:41Z</dc:date>
    <item>
      <title>Non-unified axis (different offsets) for 2 layouts with discrete axis (barcharts) GTL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244437#M8852</link>
      <description>&lt;P&gt;Hi SAS Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to produce waterfall plots with extremely different sample sizes for 2 treatment groups. The problem is that width of the bars differs a lot in the case with very different sample sizes. I'm trying to place bars in the center for the group with small sample size using big offsets and minimize the barwidth&amp;nbsp;but I faced the problem that SAS aligns boundary ticks one under other:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1491i245344C7DA6B86D7/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="win7-amd64-sas94-vbox [Работает] - Oracle VM VirtualBox 2016-01-19 16.27.10.png" title="win7-amd64-sas94-vbox [Работает] - Oracle VM VirtualBox 2016-01-19 16.27.10.png" /&gt;&lt;/P&gt;&lt;P&gt;I need to minimize offsets for the bottom layout while save offsets for the top layout. As on the image below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1492i023197046F9E5E0B/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="win7-amd64-sas94-vbox [Работает] - Oracle VM VirtualBox 2016-01-19 16.34.51.png" title="win7-amd64-sas94-vbox [Работает] - Oracle VM VirtualBox 2016-01-19 16.34.51.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But sas ignores offsets options and takes a maximum of the offsets from top and bottom layout.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below please see sas code used to produce outputs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
	do x = 1 to 5;
		y = ranuni(0)*100;
		output;
	end;
	do x2 = 1 to 20;
		y2 = ranuni(0)*100;
		output;
	end;
run;

proc template;
	define statgraph Statgraph.test;
	begingraph;
		layout lattice / rows=2 columns=1;

			layout overlay / xaxisopts=(offsetmin=.35 offsetmax=.35);
				barchart x=x y=y;
			endlayout;

			layout overlay / xaxisopts=(offsetmin=.05 offsetmax=.05);
				barchart x=x2 y=y2;
			endlayout;

		endlayout;
	endgraph;
	end;
run;

ods html;

proc sgrender data=sample template=Statgraph.test;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Options for layout lattice as rowdatarange&amp;nbsp;do not affect&amp;nbsp;on graphs. Seems that the problem is related to discrete axis type which is the only type allowed for barchart. Could anyone help with this problem? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 14:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244437#M8852</guid>
      <dc:creator>sspkmnd</dc:creator>
      <dc:date>2016-01-19T14:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Non-unified axis (different offsets) for 2 layouts with discrete axis (barcharts) GTL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244440#M8853</link>
      <description>&lt;P&gt;I'm not sure how you intend to use this display, but consider whether you can add a group variable and then call the SGPANEL procedure to plot both groups in a column. The SGPANEL procedure supports many options for equating or not equating axes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
   group = 1;
	do x = 1 to 5;
		y = ranuni(123)*100;
		output;
	end;
   group = 2;
	do x = 1 to 20;
		y = ranuni(123)*100;
		output;
	end;
run;

proc sgpanel data=sample;
   panelby group / columns=1;
   vbar x / response=y;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG title="SGPanel2.png" alt="SGPanel2.png" src="https://communities.sas.com/t5/image/serverpage/image-id/1493i5E1B8DAE06D03A07/image-size/medium?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 14:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244440#M8853</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-01-19T14:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Non-unified axis (different offsets) for 2 layouts with discrete axis (barcharts) GTL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244442#M8854</link>
      <description>&lt;P&gt;Break the "sibling" relationship by adding a LAYOUT GRIDDED around the second LAYOUT OVERLAY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt;&amp;nbsp; define statgraph Statgraph.test;&lt;BR /&gt;&amp;nbsp; begingraph;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; layout lattice / rows=2 columns=1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; layout overlay / xaxisopts=(offsetmin=.35 offsetmax=.35);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; barchart x=x y=y;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; endlayout;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; layout gridded;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; layout overlay / xaxisopts=(offsetmin=.05 offsetmax=.05);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; barchart x=x2 y=y2;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endlayout;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; endlayout;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; endlayout;&lt;BR /&gt; endgraph;&lt;BR /&gt; end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1494i80AABC39DB6FB882/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="WaterfallPanel.png" title="WaterfallPanel.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 14:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244442#M8854</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-01-19T14:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Non-unified axis (different offsets) for 2 layouts with discrete axis (barcharts) GTL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244447#M8856</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the quick reply, your solution works but I need something which will work with my approach, I have very "big" macro and it will consume a huge amount of time to rewrite using your approach&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 15:13:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244447#M8856</guid>
      <dc:creator>sspkmnd</dc:creator>
      <dc:date>2016-01-19T15:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Non-unified axis (different offsets) for 2 layouts with discrete axis (barcharts) GTL</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244448#M8857</link>
      <description>&lt;P&gt;Since you mention waterfall plots, you might want to look at the article &lt;A href="http://blogs.sas.com/content/iml/2015/04/20/waterfall-plot.html" target="_self"&gt;"Create a waterfall chart in SAS."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Sanjay has also written about this kind of chart in &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2014/11/15/clinical-graphs/" target="_self"&gt;"Clinical Graphs."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 15:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Non-unified-axis-different-offsets-for-2-layouts-with-discrete/m-p/244448#M8857</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-01-19T15:15:03Z</dc:date>
    </item>
  </channel>
</rss>

