<?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: One PNG file for multiple plot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495090#M16916</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/91198"&gt;@Leo9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the input. Could you please elaborate more I didn't quite understand what you were trying to say.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You are currently calling Proc SGRENDER 4 times. That will create 4 image files. You are using PDF layout regions to place them into a 2 row 2 column display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get a single image with that appearance then you would need to do something to combine the 4 GTL templates you are calling into a single template and use a single call to proc sgrender &lt;STRONG&gt;without&lt;/STRONG&gt; the PDF layout row and column code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods layout Start width=10in height=5in columns=2 rows=2 column_gutter=.05in row_gutter=.08in row_heights=(2.2in 2.2in);&lt;/PRE&gt;
&lt;P&gt;The above line has 2 columns and 2 rows. Those pieces would have to be removed along with the gutter values (address that in the modified template code)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods region row=1 column=1;&lt;/PRE&gt;
&lt;P&gt;Says which region of the PDF the sgrender output goes to. All of those region statements would go away.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would have a single call to proc sgender.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code for the 4 templates plotscat1-plotscat4 would have to be combined somehow. Since you are using 4 data sets, those would have to be combined to work with the template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without the data and the templates that is as far as I am willing to suggest at this time.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Sep 2018 23:54:01 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-09-12T23:54:01Z</dc:date>
    <item>
      <title>One PNG file for multiple plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495061#M16913</link>
      <description>&lt;P&gt;I am trying to create four individual plots using proc sgrender and proc template. The four plots are coming up fine in the pdf format but SAS is not generating png file with all four plots in one file. Please see the code below. Any suggestions ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods listing&amp;nbsp; gpath="../output/stat/fig" image_dpi=&amp;amp;dpi ;&lt;/P&gt;&lt;P&gt;ods graphics / height=5in width=10in outputfmt=png imagename="&amp;amp;test";&lt;BR /&gt;&lt;BR /&gt;options orientation=landscape;&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;ods pdf notoc&lt;BR /&gt;dpi=&amp;amp;dpi&lt;BR /&gt;file="&amp;amp;output"&lt;BR /&gt;style=mystyles startpage=no;&lt;/P&gt;&lt;P&gt;ods layout Start width=10in height=5in columns=2 rows=2 column_gutter=.05in row_gutter=.08in row_heights=(2.2in 2.2in);&lt;BR /&gt;&lt;BR /&gt;xxxx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods layout end;&lt;BR /&gt;ods pdf close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 16:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495061#M16913</guid>
      <dc:creator>Leo9</dc:creator>
      <dc:date>2018-09-13T16:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: One PNG file for multiple plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495070#M16914</link>
      <description>&lt;P&gt;I suspect that what you will have to do is create a single template that plots all four as a single plot if you want a single png file.&lt;/P&gt;
&lt;P&gt;But that will not display in different regions of your PDF file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The GTL datalattice may allow creating the file. If you want a single PNG and use of PDF layout regions you may need to make two passes: on for the PDF and use of a second template with a different ODS destination to save the single PNG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 22:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495070#M16914</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-12T22:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: One PNG file for multiple plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495072#M16915</link>
      <description>&lt;P&gt;Thanks for the input. Could you please elaborate more I didn't quite understand what you were trying to say.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495072#M16915</guid>
      <dc:creator>Leo9</dc:creator>
      <dc:date>2018-09-12T23:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: One PNG file for multiple plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495090#M16916</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/91198"&gt;@Leo9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the input. Could you please elaborate more I didn't quite understand what you were trying to say.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You are currently calling Proc SGRENDER 4 times. That will create 4 image files. You are using PDF layout regions to place them into a 2 row 2 column display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get a single image with that appearance then you would need to do something to combine the 4 GTL templates you are calling into a single template and use a single call to proc sgrender &lt;STRONG&gt;without&lt;/STRONG&gt; the PDF layout row and column code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods layout Start width=10in height=5in columns=2 rows=2 column_gutter=.05in row_gutter=.08in row_heights=(2.2in 2.2in);&lt;/PRE&gt;
&lt;P&gt;The above line has 2 columns and 2 rows. Those pieces would have to be removed along with the gutter values (address that in the modified template code)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods region row=1 column=1;&lt;/PRE&gt;
&lt;P&gt;Says which region of the PDF the sgrender output goes to. All of those region statements would go away.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would have a single call to proc sgender.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code for the 4 templates plotscat1-plotscat4 would have to be combined somehow. Since you are using 4 data sets, those would have to be combined to work with the template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without the data and the templates that is as far as I am willing to suggest at this time.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 23:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/One-PNG-file-for-multiple-plot/m-p/495090#M16916</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-12T23:54:01Z</dc:date>
    </item>
  </channel>
</rss>

