<?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: Change Number and Layout of Graphs in an .RTF File in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/318316#M11158</link>
    <description>&lt;P&gt;PDF is fine, could you tell me how to implement that solution? Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 12 Dec 2016 16:51:13 GMT</pubDate>
    <dc:creator>acuffza</dc:creator>
    <dc:date>2016-12-12T16:51:13Z</dc:date>
    <item>
      <title>Change Number and Layout of Graphs in an .RTF File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309100#M10845</link>
      <description>&lt;P&gt;I'm making a lot of box plots (270) and sending them to an .rtf file. However, the default is to put one graph per page, which takes up far too much room. Ideally, I'd like to be able to control the number and layout of graphs per page--for example, "3 rows and 4 columns" or "4 rows and 5 columns", etc. so that I can get fewer pages. Does anyone know of a way to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my macro which creates a single (jittered) box plot:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;%macro box_plots (variable_title=, variable=);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;proc template; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; define statgraph &amp;amp;variable.;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; begingraph;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; entryTitle "Serum Samples: &amp;amp;variable_title. by &amp;amp;phenotype_title."; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; layout overlay / xaxisopts=(display=(tickvalues)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;linearOpts=(tickvalueSequence=(start=1 increment=1 end=&amp;amp;num_of_groups.)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; tickValueFormat=groupfmt.))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; yaxisopts=(label="Concentration (uM)");&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; scatterPlot x=eval(0.08*rannor(569154)+group_n) y=&amp;amp;variable. /&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; markerAttrs=(symbol=circle) group=group_n datalabel=&amp;amp;variable._lab&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; dataTransparency=0; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; boxplot x=group_n y=&amp;amp;variable. / display=(caps mean median)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; meanAttrs=(symbol=diamond color=black);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; endlayout; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; endgraph; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; end; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; run;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;proc sgrender template=&amp;amp;variable. data=&amp;amp;variable.;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; run;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;%mend box_plots;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here is my code which outputs the graphs to an RTF file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ods rtf file="O:\Path\3b All Analytes by Exposure and Sex Box Plots &amp;amp;sysdate. ZA.rtf";&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;%box_plots(variable=c_1, variable_title=C0);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;/*269 more iterations of this macro with different variables*/&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ods rtf close;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 17:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309100#M10845</guid>
      <dc:creator>acuffza</dc:creator>
      <dc:date>2016-11-03T17:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Change Number and Layout of Graphs in an .RTF File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309112#M10846</link>
      <description>&lt;P&gt;My first thought would be to look at SGPANEL and appropriate panel by statement / variables added to your data if needed. Group like topics and use specified numbers of columns and rows. The HBOX or VBOX will do box plots with different oreintation.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309112#M10846</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-03T18:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change Number and Layout of Graphs in an .RTF File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309115#M10847</link>
      <description>&lt;P&gt;I agree with ballardw. I addition, if you do not have any natural grouping variables in your data, you can make up an indexing variable (1, 2, 3, etc.) for the data you want in each cell. Starting in SAS 9.4, we added a NOHEADER option on the PANELBY statement to turn off the cell headers. For this case, you can use the option to supress the display of the indexing variable, which has no meaning, while giving you control over your grid layout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:50:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309115#M10847</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-11-03T18:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Change Number and Layout of Graphs in an .RTF File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309119#M10848</link>
      <description>&lt;P&gt;Thank you for the feedback! Unfortunately, I don't think SGPANEL will help here because I have to use a graph template since I'm doing&amp;nbsp;jittered box plots, and I'm not sure how to use panels for this kind of graph. Additionally, all of the 270 variables are on wildly different scales which I think is a problem for SGPANEL (and it isn't convenient to look for variables with similar enough scales to group together). Unless you know of a solution to these dilemmas?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309119#M10848</guid>
      <dc:creator>acuffza</dc:creator>
      <dc:date>2016-11-03T18:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Change Number and Layout of Graphs in an .RTF File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309122#M10849</link>
      <description>&lt;P&gt;For SAS 9.4, Jittering support was added to the SCATTER statement in SGPLOT and SGPANEL, as was the ability to overlay the SCATTERs and BOXPLOTs. However, if your box plots are not in comparitive ranges, then SGPANEL will not work well for you. There are ways to make only one axis uniform and not the other, but that requires a layout of either one column or one row to be most effective.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a side note, if you generate PDF instead of RTF, you could use ODS LAYOUT to do exactly what you want. Is that format possible for you?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 19:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309122#M10849</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-11-03T19:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Change Number and Layout of Graphs in an .RTF File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309125#M10850</link>
      <description>&lt;P&gt;Yes, a PDF would be just fine! I usually just use .rtf because it's easier for me. Could you tell me how to do this with a PDF? Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 19:09:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/309125#M10850</guid>
      <dc:creator>acuffza</dc:creator>
      <dc:date>2016-11-03T19:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Change Number and Layout of Graphs in an .RTF File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/318316#M11158</link>
      <description>&lt;P&gt;PDF is fine, could you tell me how to implement that solution? Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 16:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Number-and-Layout-of-Graphs-in-an-RTF-File/m-p/318316#M11158</guid>
      <dc:creator>acuffza</dc:creator>
      <dc:date>2016-12-12T16:51:13Z</dc:date>
    </item>
  </channel>
</rss>

