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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 812 views
  • 0 likes
  • 2 in conversation