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?
Here is my macro which creates a single (jittered) box plot:
%macro box_plots (variable_title=, variable=);
proc template; define statgraph &variable.; begingraph; entryTitle "Serum Samples: &variable_title. by &phenotype_title."; layout overlay / xaxisopts=(display=(tickvalues)
linearOpts=(tickvalueSequence=(start=1 increment=1 end=&num_of_groups.) tickValueFormat=groupfmt.)) yaxisopts=(label="Concentration (uM)"); scatterPlot x=eval(0.08*rannor(569154)+group_n) y=&variable. / markerAttrs=(symbol=circle) group=group_n datalabel=&variable._lab dataTransparency=0; boxplot x=group_n y=&variable. / display=(caps mean median) meanAttrs=(symbol=diamond color=black); endlayout; endgraph; end; run;
proc sgrender template=&variable. data=&variable.; run;
%mend box_plots;
And here is my code which outputs the graphs to an RTF file:
ods rtf file="O:\Path\3b All Analytes by Exposure and Sex Box Plots &sysdate. ZA.rtf";
%box_plots(variable=c_1, variable_title=C0);
/*269 more iterations of this macro with different variables*/
ods rtf close;
... View more