Data visualization with SAS programming

SGPLOT output

Reply
N/A
Posts: 0

SGPLOT output

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
SAS Super FREQ
Posts: 1,044

Re: SGPLOT output

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.
N/A
Posts: 0

Re: SGPLOT output

Many thanks and a good holiday to you.
Post a Question
Discussion Stats
  • 2 replies
  • 95 views
  • 0 likes
  • 2 in conversation