<?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 Layout lattice independent x axes across cells in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Layout-lattice-independent-x-axes-across-cells/m-p/428318#M14771</link>
    <description>&lt;P&gt;I'm trying to produce a rather complicated lattice plot stacking 3 forest plots on top of each other. When I do this with layout gridded the horizontal distribution of each cell is fine, but the top graph is bigger than the bottom two, so gets squashed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using layout lattice and setting rowweights gets round the vertical squashing, but when i do this the horizontal distribution is messed up in each cell. It seems like layout lattice is lining up the scatter plots so they appear above each other. From the documentation, I thought the default was rowdatarange=data which should make each cell independent, but it isn't working. See images below for example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone advise?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph panel_forest;
   begingraph / collation=binary subpixel=on axisLineExtent=data;

   		layout lattice / rows=3 rowgutter=5 rowweights=(0.5 0.25 0.25) rowdatarange=data columndatarange=data;

		*Top;
	      layout overlay / walldisplay=none xaxisopts=(display=(ticks tickvalues
	         line) labelFitPolicy=Split offsetmin=0 offsetmax=0 type=linear)
	         yaxisopts=(reverse=true display=none offsetmin=0 offsetmax=0.01 type=
	         linear);
	         ReferenceLine Y=REF / clip=true Lineattrs=(Color=CXF0F0F7 Thickness=30
	            );
	         InnerMargin / align=left;
	            AxisTable Value=VAR_FORM Y=ORDER / labelPosition=min ValueAttrs=(
	               Size=9pt) ValueJustify=Left LabelJustify=Left Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK1 Y=ORDER / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK2 Y=ORDER / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=COUNT Y=ORDER / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=PVAL2 Y=ORDER / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=PROB_INT2 Y=ORDER / labelPosition=min ValueAttrs=(
	               Size=9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         DrawText "" / X=31 Y=98 DRAWSPACE=graphpercent WIDTH=
	            20;
	         ScatterPlot X=ESTIMATE Y=ORDER / subpixel=off Group=GROUP Markerattrs=
	            (Color=CX2A25D9 Symbol=SQUAREFILLED Size=4) LegendLabel="order"
	            NAME="SCATTER";
	         HighLowPlot Y=ORDER High=UPPERLRCL Low=LOWERLRCL / primary=true Group=
	            GROUP Lineattrs=(Color=CX2A25D9 Pattern=1) LegendLabel="order" NAME
	            ="HIGHLOW" highCap=serif lowCap=serif;
	         ReferenceLine x=0 / clip=true Lineattrs=(Color=CX000000);

	      endlayout;

		*Middle;
	      layout overlay / walldisplay=none xaxisopts=(display=(ticks tickvalues
	         line) offsetmin=0 offsetmax=0 type=linear linearopts=(tickvaluelist=(0
	         1 2 3 4) viewmin=0 viewmax=4)) y2axisopts=(labelFitPolicy=Split)
	         yaxisopts=(reverse=true display=none labelFitPolicy=Split offsetmin=0
	         offsetmax=0.01 type=linear linearopts=(viewmin=0.5 viewmax=7))
	         y2axisopts=(labelFitPolicy=Split);
	         ReferenceLine Y=REF_s / clip=true Lineattrs=(Color=CXF0F0F7 Thickness=30
	            );
	         InnerMargin / align=left;
	            AxisTable Value=VAR_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Left LabelJustify=Left Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK1_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK2_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=COUNT_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(
	               Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=PVAL2_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         ScatterPlot X=ESTIMATE_s Y=ORDER_s / subpixel=off Markerattrs=(Color=
	            CX2A25D9 Symbol=SQUAREFILLED Size=4) LegendLabel="order_s" NAME=
	            "SCATTER_s";
	         HighLowPlot Y=ORDER_s High=UPPERLRCL_s Low=LOWERLRCL_s / primary=true
	            Lineattrs=(Color=CX2A25D9 Pattern=1) LegendLabel="order_s" NAME=
	            "HIGHLOW_s" highCap=serif lowCap=serif;
	         ReferenceLine x=1 / clip=true Lineattrs=(Color=CX000000);

	      endlayout;

		*Bottom;
	      layout overlay / walldisplay=none x2axisopts=(labelFitPolicy=Split)
	         xaxisopts=(display=(ticks tickvalues line) labelFitPolicy=Split
	         offsetmin=0 offsetmax=0 type=linear linearopts=(tickvaluelist=(0.5 1
	         1.5 2) viewmin=0.5 viewmax=2)) yaxisopts=(reverse=true display=none
	         offsetmin=0 offsetmax=0.01 type=linear linearopts=(viewmin=0.5 viewmax
	         =7)) x2axisopts=(labelFitPolicy=Split);
	         ReferenceLine Y=REF_h / clip=true Lineattrs=(Color=CXF0F0F7 Thickness=30
	            );
	         InnerMargin / align=left;
	            AxisTable Value=VAR_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Left LabelJustify=Left Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK1_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK2_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=COUNT_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(
	               Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=PVAL2_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         ScatterPlot X=HAZARDRATIO Y=ORDER_h / subpixel=off Markerattrs=(Color=
	            CX2A25D9 Symbol=SQUAREFILLED Size=4) LegendLabel="order_h" NAME=
	            "SCATTER_h";
	         HighLowPlot Y=ORDER_h High=PLUPPER Low=PLLOWER / primary=true Lineattrs=
	            (Color=CX2A25D9 Pattern=1) LegendLabel="order_h" NAME="HIGHLOW_h"
	            highCap=serif lowCap=serif;
	         ReferenceLine x=1 / clip=true Lineattrs=(Color=CX000000);

	      endlayout;

		endlayout;

   endgraph;
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Layout gridded" style="width: 514px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17917iA3DA3ADA914B1311/image-size/large?v=v2&amp;amp;px=999" role="button" title="Gridded.png" alt="Layout gridded" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Layout gridded&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Layout lattice" style="width: 514px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17918iEB424581D1AACD78/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lattice.png" alt="Layout lattice" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Layout lattice&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 10:37:29 GMT</pubDate>
    <dc:creator>DGrint</dc:creator>
    <dc:date>2018-01-17T10:37:29Z</dc:date>
    <item>
      <title>Layout lattice independent x axes across cells</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Layout-lattice-independent-x-axes-across-cells/m-p/428318#M14771</link>
      <description>&lt;P&gt;I'm trying to produce a rather complicated lattice plot stacking 3 forest plots on top of each other. When I do this with layout gridded the horizontal distribution of each cell is fine, but the top graph is bigger than the bottom two, so gets squashed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using layout lattice and setting rowweights gets round the vertical squashing, but when i do this the horizontal distribution is messed up in each cell. It seems like layout lattice is lining up the scatter plots so they appear above each other. From the documentation, I thought the default was rowdatarange=data which should make each cell independent, but it isn't working. See images below for example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone advise?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph panel_forest;
   begingraph / collation=binary subpixel=on axisLineExtent=data;

   		layout lattice / rows=3 rowgutter=5 rowweights=(0.5 0.25 0.25) rowdatarange=data columndatarange=data;

		*Top;
	      layout overlay / walldisplay=none xaxisopts=(display=(ticks tickvalues
	         line) labelFitPolicy=Split offsetmin=0 offsetmax=0 type=linear)
	         yaxisopts=(reverse=true display=none offsetmin=0 offsetmax=0.01 type=
	         linear);
	         ReferenceLine Y=REF / clip=true Lineattrs=(Color=CXF0F0F7 Thickness=30
	            );
	         InnerMargin / align=left;
	            AxisTable Value=VAR_FORM Y=ORDER / labelPosition=min ValueAttrs=(
	               Size=9pt) ValueJustify=Left LabelJustify=Left Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK1 Y=ORDER / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK2 Y=ORDER / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=COUNT Y=ORDER / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=PVAL2 Y=ORDER / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=PROB_INT2 Y=ORDER / labelPosition=min ValueAttrs=(
	               Size=9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         DrawText "" / X=31 Y=98 DRAWSPACE=graphpercent WIDTH=
	            20;
	         ScatterPlot X=ESTIMATE Y=ORDER / subpixel=off Group=GROUP Markerattrs=
	            (Color=CX2A25D9 Symbol=SQUAREFILLED Size=4) LegendLabel="order"
	            NAME="SCATTER";
	         HighLowPlot Y=ORDER High=UPPERLRCL Low=LOWERLRCL / primary=true Group=
	            GROUP Lineattrs=(Color=CX2A25D9 Pattern=1) LegendLabel="order" NAME
	            ="HIGHLOW" highCap=serif lowCap=serif;
	         ReferenceLine x=0 / clip=true Lineattrs=(Color=CX000000);

	      endlayout;

		*Middle;
	      layout overlay / walldisplay=none xaxisopts=(display=(ticks tickvalues
	         line) offsetmin=0 offsetmax=0 type=linear linearopts=(tickvaluelist=(0
	         1 2 3 4) viewmin=0 viewmax=4)) y2axisopts=(labelFitPolicy=Split)
	         yaxisopts=(reverse=true display=none labelFitPolicy=Split offsetmin=0
	         offsetmax=0.01 type=linear linearopts=(viewmin=0.5 viewmax=7))
	         y2axisopts=(labelFitPolicy=Split);
	         ReferenceLine Y=REF_s / clip=true Lineattrs=(Color=CXF0F0F7 Thickness=30
	            );
	         InnerMargin / align=left;
	            AxisTable Value=VAR_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Left LabelJustify=Left Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK1_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK2_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=COUNT_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(
	               Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=PVAL2_s Y=ORDER_s / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         ScatterPlot X=ESTIMATE_s Y=ORDER_s / subpixel=off Markerattrs=(Color=
	            CX2A25D9 Symbol=SQUAREFILLED Size=4) LegendLabel="order_s" NAME=
	            "SCATTER_s";
	         HighLowPlot Y=ORDER_s High=UPPERLRCL_s Low=LOWERLRCL_s / primary=true
	            Lineattrs=(Color=CX2A25D9 Pattern=1) LegendLabel="order_s" NAME=
	            "HIGHLOW_s" highCap=serif lowCap=serif;
	         ReferenceLine x=1 / clip=true Lineattrs=(Color=CX000000);

	      endlayout;

		*Bottom;
	      layout overlay / walldisplay=none x2axisopts=(labelFitPolicy=Split)
	         xaxisopts=(display=(ticks tickvalues line) labelFitPolicy=Split
	         offsetmin=0 offsetmax=0 type=linear linearopts=(tickvaluelist=(0.5 1
	         1.5 2) viewmin=0.5 viewmax=2)) yaxisopts=(reverse=true display=none
	         offsetmin=0 offsetmax=0.01 type=linear linearopts=(viewmin=0.5 viewmax
	         =7)) x2axisopts=(labelFitPolicy=Split);
	         ReferenceLine Y=REF_h / clip=true Lineattrs=(Color=CXF0F0F7 Thickness=30
	            );
	         InnerMargin / align=left;
	            AxisTable Value=VAR_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Left LabelJustify=Left Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK1_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=left;
	            AxisTable Value=RISK2_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=COUNT_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(
	               Label);
	         EndInnerMargin;
	         InnerMargin / align=right;
	            AxisTable Value=PVAL2_h Y=ORDER_h / labelPosition=min ValueAttrs=(Size=
	               9pt) ValueJustify=Center Display=(Label);
	         EndInnerMargin;
	         ScatterPlot X=HAZARDRATIO Y=ORDER_h / subpixel=off Markerattrs=(Color=
	            CX2A25D9 Symbol=SQUAREFILLED Size=4) LegendLabel="order_h" NAME=
	            "SCATTER_h";
	         HighLowPlot Y=ORDER_h High=PLUPPER Low=PLLOWER / primary=true Lineattrs=
	            (Color=CX2A25D9 Pattern=1) LegendLabel="order_h" NAME="HIGHLOW_h"
	            highCap=serif lowCap=serif;
	         ReferenceLine x=1 / clip=true Lineattrs=(Color=CX000000);

	      endlayout;

		endlayout;

   endgraph;
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Layout gridded" style="width: 514px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17917iA3DA3ADA914B1311/image-size/large?v=v2&amp;amp;px=999" role="button" title="Gridded.png" alt="Layout gridded" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Layout gridded&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Layout lattice" style="width: 514px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17918iEB424581D1AACD78/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lattice.png" alt="Layout lattice" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Layout lattice&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 10:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Layout-lattice-independent-x-axes-across-cells/m-p/428318#M14771</guid>
      <dc:creator>DGrint</dc:creator>
      <dc:date>2018-01-17T10:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Layout lattice independent x axes across cells</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Layout-lattice-independent-x-axes-across-cells/m-p/428361#M14777</link>
      <description>&lt;P&gt;In a lattice, the margins of the plot are always lined up, regardless of the data range setting. However, there is a trick to disabling the alignment. Try wrapping each of your LAYOUT OVERLAY blocks with a LAYOUT GRIDDED. The extra level layout disconnects the LAYOUT OVERLAYs from the alignment negotiations. Let me know if that works for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 13:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Layout-lattice-independent-x-axes-across-cells/m-p/428361#M14777</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-01-17T13:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Layout lattice independent x axes across cells</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Layout-lattice-independent-x-axes-across-cells/m-p/428391#M14790</link>
      <description>&lt;P&gt;You wonderful person! Thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Layout-lattice-independent-x-axes-across-cells/m-p/428391#M14790</guid>
      <dc:creator>DGrint</dc:creator>
      <dc:date>2018-01-17T14:51:24Z</dc:date>
    </item>
  </channel>
</rss>

