SGPANEL Procedure
Example 4: Creating a Panel of Line Charts
Features: |
VLINE statement
|
Sample library member: |
SGPNLIN |
This example shows a
panel of line plots with grouped data.
Program
proc sgpanel data=sashelp.prdsale;
where product in ("CHAIR" "SOFA");
title "Yearly Sales by Product";
panelby year / spacing=5 novarname;
vline month / response=actual group=product;
run;
title;
Program Description
Create the panel and specify a title.
proc sgpanel data=sashelp.prdsale;
where product in ("CHAIR" "SOFA");
title "Yearly Sales by Product";
Specify the classification variable for the panel. The SPACING= option specifies the number of pixels
between the panels in the plot. The NOVARNAME option specifies that
the classification variable name is not shown in the headings for
each cell.
panelby year / spacing=5 novarname;
Create the vertical line plot. The
RESPONSE= option specifies the response variable. The GROUP= option
specifies the group variable.
vline month / response=actual group=product;
run;
Copyright © SAS Institute Inc. All rights reserved.