<?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: i want a panel but can't use sgpanl(?) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/543825#M17921</link>
    <description>&lt;P&gt;excellent answers. I'll try all 3 approaches and report back....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i decided to use the "ods&amp;nbsp; layout gridded" and it worked well. My code looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file="...\figure4.pdf"; 

title j=c h=1 "Figure 4. ...."; 
footnote ; 

ods layout gridded columns=2; 

ods region height=2.5in; 
title ; 
proc sgplot data=fig4 (where=(cohort=1)) noautolegend; 
format cohort cohort_f. ...; 
: 
run; 

ods region height=2.5in;
title ; 
proc sgplot data=fig4 (where=(cohort=2)) noautolegend; 
: 
: 
etc&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and this image looks like this: &lt;A href="https://drive.google.com/file/d/1L0IEzfePY4UEENNCRsP70NMg4OOTgqag/view?usp=sharing" target="_self"&gt;figure&lt;/A&gt;. I guess if i played around with it more i could create a tiff file instead of pdf, and refine it in other ways&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2019 12:18:44 GMT</pubDate>
    <dc:creator>pau13rown</dc:creator>
    <dc:date>2019-03-18T12:18:44Z</dc:date>
    <item>
      <title>i want a panel but can't use sgpanl(?)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/537540#M17831</link>
      <description>&lt;P&gt;i like this blog post by Sanjay Matange (@sanjay1 ?) &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2014/01/18/two-in-one-graph/#prettyPhoto" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2014/01/18/two-in-one-graph/#prettyPhoto&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but how can i create a grid of such plots e.g. if i want a grid with 4 cells and each cell contains the kind of plot Sanjay has produced. Proc sgpanel does not allow the yaxis2 which achieves Sanjay's plot, and sgplot does not allow a panel. Thus, how to achieve both features...? cheers&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 21:31:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/537540#M17831</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2019-02-21T21:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: i want a panel but can't use sgpanl(?)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/537553#M17832</link>
      <description>Can you drop down to GTL?</description>
      <pubDate>Thu, 21 Feb 2019 22:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/537553#M17832</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-21T22:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: i want a panel but can't use sgpanl(?)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/542246#M17893</link>
      <description>&lt;P&gt;i'm trying to read up on gtl, given your suggestion, but the info out there seems scattered and incomplete. Eg, i generated my figure using sgplot. How do i now gain access to the proc template code which needs to be modified and is apparently hiding in the background somewhere? I ought to use that code as a starting point, if it's at all possible to create the fig as i want it. There are papers like this: &lt;A href="http://support.sas.com/rnd/app/ODSGraphics/papers/modtmplt.pdf" target="_blank"&gt;http://support.sas.com/rnd/app/ODSGraphics/papers/modtmplt.pdf&lt;/A&gt; which imply that it's rather easy to obtain the source code, but what they suggest amounts to nothing.... cheers&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 23:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/542246#M17893</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2019-03-11T23:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: i want a panel but can't use sgpanl(?)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/542748#M17898</link>
      <description>&lt;P&gt;You can use the ODS LAYOUT GRIDDED statement to assemble graphs (and/or tables) into a gridded arrangement. See&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2015/11/23/ods-statement-options-to-change/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2015/11/23/ods-statement-options-to-change/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and a few additional comments in&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2015/12/02/matrices-graphs-gridded-layout.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2015/12/02/matrices-graphs-gridded-layout.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 12:40:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/542748#M17898</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-03-13T12:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: i want a panel but can't use sgpanl(?)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/542805#M17900</link>
      <description>&lt;P&gt;One other alternative is to use ODS LAYOUT to create your 2x2 arrangement. That way, you can still use SGPLOT four times to create each plot, but have ODS arrange them 2x2 on the page. Would that work for you?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 14:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/542805#M17900</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-03-13T14:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: i want a panel but can't use sgpanl(?)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/543386#M17904</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183379"&gt;@pau13rown&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;i'm trying to read up on gtl, given your suggestion, but the info out there seems scattered and incomplete. Eg, i generated my figure using sgplot. How do i now gain access to the proc template code which needs to be modified and is apparently hiding in the background somewhere? I ought to use that code as a starting point, if it's at all possible to create the fig as i want it. There are papers like this: &lt;A href="http://support.sas.com/rnd/app/ODSGraphics/papers/modtmplt.pdf" target="_blank" rel="noopener"&gt;http://support.sas.com/rnd/app/ODSGraphics/papers/modtmplt.pdf&lt;/A&gt; which imply that it's rather easy to obtain the source code, but what they suggest amounts to nothing.... cheers&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did you try the TMPLOUT out option on SGPLOT?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.cars tmplout='/folders/myfolders/demo.txt';
scatter x=mpg_highway y=mpg_city / group=origin;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Generated code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph sgplot;
begingraph / collation=binary;
layout overlay / xaxisopts=(labelFitPolicy=Split) x2axisopts=(labelFitPolicy=Split);
   ScatterPlot X=MPG_Highway Y=MPG_City / subpixel=off primary=true Group=Origin LegendLabel="MPG (City)" NAME="SCATTER";
   DiscreteLegend "SCATTER"/ title="Origin";
endlayout;
endgraph;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I find the documentation pretty thorough, but you do need to use the most recent versions, SAS 9.2 is about a decade old.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=grstatug&amp;amp;docsetTarget=titlepage.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=grstatug&amp;amp;docsetTarget=titlepage.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's at least one or two examples on creating a lattice/panel that I see on that page.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 02:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/543386#M17904</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-15T02:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: i want a panel but can't use sgpanl(?)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/543825#M17921</link>
      <description>&lt;P&gt;excellent answers. I'll try all 3 approaches and report back....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i decided to use the "ods&amp;nbsp; layout gridded" and it worked well. My code looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file="...\figure4.pdf"; 

title j=c h=1 "Figure 4. ...."; 
footnote ; 

ods layout gridded columns=2; 

ods region height=2.5in; 
title ; 
proc sgplot data=fig4 (where=(cohort=1)) noautolegend; 
format cohort cohort_f. ...; 
: 
run; 

ods region height=2.5in;
title ; 
proc sgplot data=fig4 (where=(cohort=2)) noautolegend; 
: 
: 
etc&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and this image looks like this: &lt;A href="https://drive.google.com/file/d/1L0IEzfePY4UEENNCRsP70NMg4OOTgqag/view?usp=sharing" target="_self"&gt;figure&lt;/A&gt;. I guess if i played around with it more i could create a tiff file instead of pdf, and refine it in other ways&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 12:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/i-want-a-panel-but-can-t-use-sgpanl/m-p/543825#M17921</guid>
      <dc:creator>pau13rown</dc:creator>
      <dc:date>2019-03-18T12:18:44Z</dc:date>
    </item>
  </channel>
</rss>

