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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 786 views
  • 0 likes
  • 2 in conversation