The SAS Output Delivery System and reporting techniques

Stacking PROC SGPLOT in ODS Output

Reply
New Contributor
Posts: 3

Stacking PROC SGPLOT in ODS Output

[ Edited ]

Using SAS Enterprise Guide 6.100 (6.100.0.2870) (64-bit) on Windows 7 Professional I am using ODS RTF to produce a report, which includes a PROC SGPLOT statement to produce some box-plots and again later to produce some bar-charts. I am working with unprepared data. These are split into two groups and are both called in through Macro statements. The smaller of the two groups, which has 6 categories in my PANELBY variable, is coming out nicely as two rows stacked with "columns = 3". The larger of the two groups, which contains 11 categories, is coming out as four separate rows not nicely stacked with "columns = 4".  I would like for both sets of boxplots to be stacked as the second one is with 6 categories. I have attached my code (with dummy data) as a .txt file. Thanks for your help. 


fig5a.pngfig5b.png
SAS Super FREQ
Posts: 8,864

Re: Stacking PROC SGPLOT in ODS Output

Posted in reply to Sophie-Hughes
Hi: I guess I don't understand exactly what you want. When you call the macro for fig5b you explicitly send it a value of 4 for &cols -- so until you change that, nothing will change in fig5b.

I see that you do NOT have an ODS RTF CLOSE at the bottom of your code.

Have you tried merely changing the 2nd macro call to have 3 as the value for &COLS instead of 4?

cynthia
New Contributor
Posts: 3

Re: Stacking PROC SGPLOT in ODS Output

Posted in reply to Cynthia_sas

Hi Cynthia. Fig5a is coming out with the year labels at the bottom of every graph. Fig5b has stacked one row on top of the other and there are only year labels at the very bottom of the whole thing. We did manage to fix this by adding a row statement and changing the height around. 

 

This is part of a much longer report which is why I missed the ods close! 

New Contributor
Posts: 3

Re: Stacking PROC SGPLOT in ODS Output

Posted in reply to Sophie-Hughes

So we did manage to fix this. Adding a rows = argument and playing with the width/height seemed to fix it. 

Ask a Question
Discussion stats
  • 3 replies
  • 203 views
  • 0 likes
  • 2 in conversation