if I have 50 products, and I will have 50 lines in the plot.
it won't show keylegend since it will take too much space. if I want to show keylegend and want to put it in the next page, how should I do that? thanks.
* this is Example 4: Creating a Panel of Line Charts
* from SAS 9.4 ODS Graphics: Procedures Guide, Sixth
* Edition, SGPANEL Procedure. ;
proc sgpanel data=sashelp.prdsale;
where product in ("CHAIR" "SOFA");
title "Yearly Sales by Product";
panelby year / spacing=5 novarname;
vline month / response=actual group=product;
title 'Default font size for keylegend';
run;
title;
proc sgpanel data=sashelp.prdsale;
where product in ("CHAIR" "SOFA");
title "Yearly Sales by Product";
panelby year / spacing=5 novarname;
vline month / response=actual group=product;
keylegend / title="Product"
titleattrs=(Size=14)
valueattrs=(Family=Arial Size=14);
title 'TITLEATTRS= changes size of font for title of legend';
title2 'VALUEATTRS= changes size of legend value labels';
run;
title;
You can use the ODS Graphics statement to make the space available to graph images bigger.
You say "next page". Which ODS destination are you using? Almost any approach with "pages" requires knowing the file type.
ODS Graphics/ height=12in;
would set the image to be 12 inches high which may allow your keylegend to fit. Additional width may also help.
I have to say the idea of 50 lines on a single plot tends to make me cringe in general.
If you are not actually going to print your result, only need electronic files, then you may also want to play with the PAPERSIZE option to allow for additional addressable space by the ODS Graphics settings.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.