BookmarkSubscribeRSS Feed
Sophie-Hughes
Calcite | Level 5

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
3 REPLIES 3
Cynthia_sas
Diamond | Level 26
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
Sophie-Hughes
Calcite | Level 5

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! 

Sophie-Hughes
Calcite | Level 5

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1799 views
  • 0 likes
  • 2 in conversation