<?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: Replaying a group of graphs to a gridded layout in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/338827#M11777</link>
    <description>&lt;P&gt;Hi Bruno,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for replying. &amp;nbsp;I suspect it is size related but am not sure it is the root cause in this instance. &amp;nbsp;Consider the following test where I used the state map dataset and pulled off the first 15 outlines. &amp;nbsp;I reduced the size of the images to a 2"x2" square and the pdf actually got worse. &amp;nbsp;? &amp;nbsp;I suspect the layout code is working because when I uncomment the ods html statement that comes out fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title; &lt;BR /&gt;options nodate topmargin=.1in bottommargin=.1in leftmargin=.1in rightmargin=.1in orientation=landscape; &lt;BR /&gt; &lt;BR /&gt;ods graphics on / width=2in height=2in; &lt;BR /&gt;goptions device=actximg hsize=2in vsize=2in;; &lt;BR /&gt;ods html close; &lt;BR /&gt; &lt;BR /&gt;* select an empty pattern (v=e); &lt;BR /&gt;pattern v=e; &lt;BR /&gt; &lt;BR /&gt;proc sql outobs=15; &lt;BR /&gt; create table states as select distinct statecode from maps.us; &lt;BR /&gt;run; &lt;BR /&gt; &lt;BR /&gt;proc sort data=maps.us out=maps; by statecode; run; &lt;BR /&gt; &lt;BR /&gt;proc document name=work.states; &lt;BR /&gt; delete \states; &lt;BR /&gt;run; &lt;BR /&gt;quit; &lt;BR /&gt; &lt;BR /&gt;ods document name=work.states (update) dir=(path=\states label='States'); &lt;BR /&gt; &lt;BR /&gt;proc gmap map=maps data=states; &lt;BR /&gt; by statecode; &lt;BR /&gt; id statecode; &lt;BR /&gt; choro statecode / nolegend; &lt;BR /&gt;run; &lt;BR /&gt; &lt;BR /&gt;quit; &lt;BR /&gt;ods document close; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;ods pdf notoc file="&amp;amp;path.test.pdf"; &lt;BR /&gt;*ods html; &lt;BR /&gt;ods layout gridded columns=3 advance=output column_gutter=0; &lt;BR /&gt;ods region; &lt;BR /&gt; &lt;BR /&gt;proc document name=states ; &lt;BR /&gt; replay \states /levels=all; &lt;BR /&gt;run; &lt;BR /&gt;quit; &lt;BR /&gt;ods layout end; &lt;BR /&gt; &lt;BR /&gt;ods pdf close;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2017 15:09:21 GMT</pubDate>
    <dc:creator>BenConner</dc:creator>
    <dc:date>2017-03-07T15:09:21Z</dc:date>
    <item>
      <title>Replaying a group of graphs to a gridded layout</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/338506#M11766</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I stored a series of gmap outputs to a document store and am trying to replay them to one or more sheets in a PDF file. &amp;nbsp;Each image should fit in a 2.75x3.5" rectangle and I wanted them 3 across (in landscape mode).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code I'm using is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options mprint nodate nonumber center orientation=landscape;&lt;BR /&gt;options topmargin=.25IN bottommargin=.25IN leftmargin=.25IN rightmargin=.25IN ;&lt;BR /&gt;ods graphics on / width=3.5in height=2.75in;&lt;BR /&gt;ods pdf notoc file="&amp;amp;path.test.pdf";&lt;/P&gt;
&lt;P&gt;ods layout gridded columns=3 advance=table;&lt;BR /&gt;ods region width=3.5in height=2.6in;&lt;BR /&gt;proc document name=in.ActV;&lt;BR /&gt; replay \zipmap / levels=all;&lt;BR /&gt;run;&lt;BR /&gt;quit;&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;
&lt;P&gt;Directing this to HTML, I get what I would expect: 3 columns and however many rows the data populates. &amp;nbsp;Going to PDF, the 1st column disappears and only 1 or two graphs show up per page. &amp;nbsp;The image that does show up is the 2nd column shifted to the 3rd column's position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure what's going on, or how to tell Proc document to drop an image in each of the row/column positions. &amp;nbsp;None of the arguments in the advance= ODS option seems to fit. &amp;nbsp;I attached the sample pdf file to illustrate the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 17:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/338506#M11766</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2017-03-06T17:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Replaying a group of graphs to a gridded layout</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/338782#M11774</link>
      <description>&lt;P&gt;Ben&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you adjust the size of the graphs as you are creating them, so that they later will fit on the page as you need it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a sample program that can be used to test it out. You can adjust the VSIZE and HSIZE options to see what happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have used centimeters and did go with the default margins.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc catalog c=work.gseg kill;
run;
quit;

/*proc document name=work.docs;*/
/*  delete \GChart#1  / levels=all;*/
/*run;*/

proc sort
  data=sashelp.cars
  out=cars
;
  by type;
run;


options ;

goptions
  reset=all
  device=png
  vsize=7cm
  hsize=8cm
  border
;

ods document name=work.docs(write);
proc gchart data=cars;
  by type;
  vbar drivetrain / subgroup=Origin;
run;
quit;
ods document close;


options
  orientation=landscape
  papersize="iso a4"
;
/*ods html file="c:\temp\report.html";*/

/*proc document name=work.docs(read);*/
/*   list / levels=all bygroups;  */
/*run;*/

ods pdf file="c:\temp\report.pdf" gtitle;

ods layout gridded columns=3 advance=output ;
proc document name=work.docs;
replay \GChart#1 / levels=all;
run;
quit;
ods layout end;
/*ods html close;*/
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 12:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/338782#M11774</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-03-07T12:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Replaying a group of graphs to a gridded layout</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/338827#M11777</link>
      <description>&lt;P&gt;Hi Bruno,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for replying. &amp;nbsp;I suspect it is size related but am not sure it is the root cause in this instance. &amp;nbsp;Consider the following test where I used the state map dataset and pulled off the first 15 outlines. &amp;nbsp;I reduced the size of the images to a 2"x2" square and the pdf actually got worse. &amp;nbsp;? &amp;nbsp;I suspect the layout code is working because when I uncomment the ods html statement that comes out fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Ben&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title; &lt;BR /&gt;options nodate topmargin=.1in bottommargin=.1in leftmargin=.1in rightmargin=.1in orientation=landscape; &lt;BR /&gt; &lt;BR /&gt;ods graphics on / width=2in height=2in; &lt;BR /&gt;goptions device=actximg hsize=2in vsize=2in;; &lt;BR /&gt;ods html close; &lt;BR /&gt; &lt;BR /&gt;* select an empty pattern (v=e); &lt;BR /&gt;pattern v=e; &lt;BR /&gt; &lt;BR /&gt;proc sql outobs=15; &lt;BR /&gt; create table states as select distinct statecode from maps.us; &lt;BR /&gt;run; &lt;BR /&gt; &lt;BR /&gt;proc sort data=maps.us out=maps; by statecode; run; &lt;BR /&gt; &lt;BR /&gt;proc document name=work.states; &lt;BR /&gt; delete \states; &lt;BR /&gt;run; &lt;BR /&gt;quit; &lt;BR /&gt; &lt;BR /&gt;ods document name=work.states (update) dir=(path=\states label='States'); &lt;BR /&gt; &lt;BR /&gt;proc gmap map=maps data=states; &lt;BR /&gt; by statecode; &lt;BR /&gt; id statecode; &lt;BR /&gt; choro statecode / nolegend; &lt;BR /&gt;run; &lt;BR /&gt; &lt;BR /&gt;quit; &lt;BR /&gt;ods document close; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;ods pdf notoc file="&amp;amp;path.test.pdf"; &lt;BR /&gt;*ods html; &lt;BR /&gt;ods layout gridded columns=3 advance=output column_gutter=0; &lt;BR /&gt;ods region; &lt;BR /&gt; &lt;BR /&gt;proc document name=states ; &lt;BR /&gt; replay \states /levels=all; &lt;BR /&gt;run; &lt;BR /&gt;quit; &lt;BR /&gt;ods layout end; &lt;BR /&gt; &lt;BR /&gt;ods pdf close;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 15:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/338827#M11777</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2017-03-07T15:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Replaying a group of graphs to a gridded layout</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/339118#M11783</link>
      <description>&lt;P&gt;Ben&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This all seems to be related to the device being used, using GOPTIONS DEVICE=PNG, it seems to work alright. Using ACTXIMG or JAVAIMG then things look differently. I do not have an explanation for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 07:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/339118#M11783</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-03-08T07:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Replaying a group of graphs to a gridded layout</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/339218#M11785</link>
      <description>Hi  Bruno&lt;BR /&gt;&lt;BR /&gt;Thanks!  So it wasn't an issue with sizing after all. I was leading myself down the wrong path. Sounds like I need to run this by the folks in tech support in case there is something that needs to be fixed. &lt;BR /&gt;&lt;BR /&gt;Much appreciated!&lt;BR /&gt;&lt;BR /&gt;Ben</description>
      <pubDate>Wed, 08 Mar 2017 13:17:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Replaying-a-group-of-graphs-to-a-gridded-layout/m-p/339218#M11785</guid>
      <dc:creator>BenConner</dc:creator>
      <dc:date>2017-03-08T13:17:41Z</dc:date>
    </item>
  </channel>
</rss>

