Sample 33171: Use PROC GBARLINE to create subgrouped bars
This sample demonstrates the SUBGROUP and LEGEND options that are available with PROC 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 the SUBGROUP and LEGEND options that are available with PROC GBARLINE beginning with SAS® 9.2.
/* Set the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;
axis1 label=('Frequency of Age') minor=none;
axis2 label=('Sum of Height') minor=none;
symbol1 i=join c=black v=dot h=1.3;
legend1 label=('Gender') value=('Female' 'Male') frame;
pattern1 v=solid c=CXDE7E6F;
pattern2 v=solid c=CX7C95CA;
title1 'Using the SUBGROUP option with PROC GBARLINE';
/* Create the graph using the SUBGROUP= option */
/* on the BAR statement */
proc gbarline data=sashelp.class;
bar age / subgroup=sex legend=legend1
discrete raxis=axis1
width=10;
plot / sumvar= height raxis=axis2;
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.
This sample demonstrates the SUBGROUP and LEGEND options that are available with PROC GBARLINE beginning with SAS® 9.2.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GBARLINE
|
Date Modified: | 2008-09-10 15:24:26 |
Date Created: | 2008-09-05 10:53:19 |
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 | |