BookmarkSubscribeRSS Feed
KevinC_
Fluorite | Level 6

Hello Everyone,

I am learning how to use PROC SGPANEL to plot data from SAS.  I would like to fit 9 panels onto one page in the output.  The code i have below puts 6 panels onto one page (I guess by default).  If I have more than 6 'panelby' values, then SAS puts 2 panels side by side and create however many pages to include the panels.  Is there a way for me to specify the number of panels per page?

ods listing close;

ods html file = 'customers.html' path='.' style=ocean;

ods graphics / reset width=600px height=400px imagename= 'Customer_Count' imagefmt=gif;

title 'Customer Count';

PROC SGPANEL data=customer_data;

PANELBY investor / novarname;

VLINE year / RESPONSE = resp_rate LINEATTRS=graphfit;

COLAXIS FITPOLICY=THIN;

ROWAXIS LABEL="Respponse";

RUN;

ods html close;

ods listing;

Thank you so much!

1 REPLY 1
ballardw
Super User

With HTML output I would increase the size of the display area. The 600x400 is pretty small for most of today's monitors and that is part of what is choking your size. Imagefmt=PNG also may give better appearance.

The options columns= and Rows=  on the Panelby statement is the basic control for appearance. If your data groups exceed the values for row and column then I usually get a new page.

Generally if I need to really control the number and content of each display I use data set option where clauses to restrict each created panel to a desired set of values and make multiple calls to procedure.

With your 9 panels example I would start with columns=3 and rows=3 ...

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 776 views
  • 0 likes
  • 2 in conversation