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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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