Help using Base SAS procedures

Proc SGPANEL Question ??

Reply
Regular Contributor
Posts: 173

Proc SGPANEL Question ??

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!

Grand Advisor
Posts: 10,062

Re: Proc SGPANEL Question ??

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

Ask a Question
Discussion stats
  • 1 reply
  • 125 views
  • 0 likes
  • 2 in conversation