Sample 33173: Subgroups and multiple lines with PROC GBARLINE
This sample demonstrates how to use PROC GBARLINE to create a graph with subgroups and multiple lines. Creating subgroups and multiple lines with GBARLINE are new features in GBARLINE beginning with SAS® 9.2.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample demonstrates how to use PROC GBARLINE to create a graph with subgroups and multiple lines. Creating subgroups and multiple lines with GBARLINE are new features in GBARLINE beginning with SAS® 9.2.
The graphics output in the Results tab was produced using SAS® 9.2. Submitting
the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Set the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;
symbol1 i=join color=orange v=dot h=1.3;
symbol2 i=join color=black v=square h=1.3;
pattern1 v=solid c=CXDE7E6F;
pattern2 v=solid c=CX7C95CA;
axis1 label=('Frequency of Age') minor=none;
axis2 label=('Height and Weight') minor=none;
/* Legend for the BAR statement */
legend1 label=none value=('Female' 'Male') frame;
/* Legend for the PLOT statements */
legend2 label=none;
title1 'Subgroups and multiple plot lines with GBARLINE';
proc gbarline data=sashelp.class;
bar age / subgroup=sex legend=legend1
discrete raxis=axis1
width=10;
plot / sumvar= height raxis=axis2;
plot / legend=legend2 sumvar=weight;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
Beginning with SAS® 9.2, you can create subgroups and mulitple lines with PROC GBARLINE.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GBARLINE
|
Date Modified: | 2008-09-10 15:27:30 |
Date Created: | 2008-09-05 11:38:17 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Microsoft Windows XP Professional | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | |
64-bit Enabled HP-UX | 9.2 TS1M0 | |
64-bit Enabled Solaris | 9.2 TS1M0 | |
HP-UX IPF | 9.2 TS1M0 | |
Linux | 9.2 TS1M0 | |
Linux for x64 | 9.2 TS1M0 | |
OpenVMS on HP Integrity | 9.2 TS1M0 | |
Solaris for x64 | 9.2 TS1M0 | |