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!
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 ...
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.