BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,

I am looking to get graphs of the series _30dpd by business day per month. I want the graphs to be next to each other (in panel form) so that I can assess the visual differences by month. The first sgplot gives the series by month on one graph. The second sgplot gives each month on a seperate page. I want to get, 4 to 6 graphs on the same page.

ods graphics on;
proc sgplot data=prelim_data_2;
series x=business_day_of_month y=_30dpd/group=date;
format date monyy.;
run;
proc sgplot data=prelim_data_2;
series x=business_day_of_month y=_30dpd;
format date monyy.;
by date;
run;
ods graphics off;

Thank you for your time in advising me.

Teresa
2 REPLIES 2
Jay54
Meteorite | Level 14
You need to use proc SGPANEL.

This works exactly like proc SGPLOT, except you can provide a PANELBY statement providing a (list of) classification variables. In your case that will be PANELBY date. You can control the paneling by providing the correct options on the PANELBY statement.

Many layouts are available, the default is PANEL, which is what you probably want for one class variable. If you have multiple class variables, say month for column and Year for Row, then you can also use LAYOUT=LATTICE.

Plot statement options are very similar to SGPLOT. Please see the doc for proc SGPANEL under SAS/GRAPH Statistical Graphics Procedures.
deleted_user
Not applicable
Many thanks and a good holiday to you.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 2 replies
  • 1084 views
  • 0 likes
  • 2 in conversation