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-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!

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