Sample 25515: Using a discrete numeric variable in a star chart with PROC GCHART
This example produces two star charts that show the total number of parts that were rejected each month for a year.
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 code produces two star charts that show the total number of parts that were rejected each month for a year.
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 border cback=white htitle=12pt;
/* Create data set REJECTS */
data rejects;
informat date date9.;
input site $ date badparts;
datalines;
Sydney 01JAN1997 22
Sydney 01FEB1997 26
Sydney 01MAR1997 14
Sydney 01APR1997 18
Sydney 01MAY1997 28
Sydney 01JUN1997 22
Sydney 01JUL1997 15
Sydney 01AUG1997 18
Sydney 01SEP1997 19
Sydney 01OCT1997 15
Sydney 01NOV1997 31
Sydney 01DEC1997 23
Atlanta 01JAN1997 18
Atlanta 01FEB1997 22
Atlanta 01MAR1997 20
Atlanta 01APR1997 23
Atlanta 01MAY1997 10
Atlanta 01JUN1997 21
Atlanta 01JUL1997 29
Atlanta 01AUG1997 20
Atlanta 01SEP1997 17
Atlanta 01OCT1997 14
Atlanta 01NOV1997 16
Atlanta 01DEC1997 18
Paris 01JAN1997 13
Paris 01FEB1997 18
Paris 01MAR1997 27
Paris 01APR1997 29
Paris 01MAY1997 26
Paris 01JUN1997 20
Paris 01JUL1997 28
Paris 01AUG1997 21
Paris 01SEP1997 12
Paris 01OCT1997 8
Paris 01NOV1997 12
Paris 01DEC1997 19
;
run;
/* Define the title for the chart */
title 'Rejected Parts';
/* Generate the first star chart */
proc gchart data=rejects;
format date worddate3.;
star date / discrete
sumvar=badparts
noheading
fill=s;
run;
/* Generate the second star chart */
star date / discrete
sumvar=badparts
noconnect
noheading
coutline=blue;
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 example produces two star charts that show the total number of parts that were rejected each month for a year.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GCHART Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Charts ==> Star
|
Date Modified: | 2005-08-24 16:06:35 |
Date Created: | 2005-05-23 14:12:36 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.1 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M0 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Professional | 9.1 TS1M0 | |
Microsoft Windows NT Workstation | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | |
Microsoft Windows XP Professional | 9.1 TS1M0 | |
64-bit Enabled AIX | 9.1 TS1M0 | |
64-bit Enabled HP-UX | 9.1 TS1M0 | |
64-bit Enabled Solaris | 9.1 TS1M0 | |
HP-UX IPF | 9.1 TS1M0 | |
Linux | 9.1 TS1M0 | |
OpenVMS Alpha | 9.1 TS1M0 | |
Tru64 UNIX | 9.1 TS1M0 | |