Sample 24912: Change the width of the boxes when creating a box plot with PROC GPLOT
This sample uses the BWIDTH option on a SYMBOL statement with PROC GPLOT to specify the width of the boxes in a box plot. The BWIDTH option can also be used to specify the width of the bars in a HILOB plot.
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 uses the BWIDTH option on a SYMBOL statement with PROC GPLOT to specify the width of the boxes in a box plot. The BWIDTH option can also be used to specify the width of the bars in a HILOB plot.
The BWIDTH option on a SYMBOL statement is only valid with the BOX and HILOB interpolations.
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;
/* Create a sample data set */
data a;
input YEAR CNT;
datalines;
1995 10
1995 40
1995 28
1995 47
1996 13
1996 25
1996 30
1996 20
1997 22
1997 60
1997 55
1997 40
1998 60
1998 43
1998 78
1998 69
1999 50
1999 31
1999 67
1999 24
;
run;
/* Use the BWIDTHoption to specify the */
/* width of the boxes */
symbol1 i=boxft bwidth=6 cv=beige co=vibg;
axis1 minor=none order=(0 to 80 by 20);
axis2 minor=none offset=(5pct,5pct);
/* Add a title to the graph */
title1 'Changing the width of the boxes in a Box Plot';
proc gplot data=a;
plot CNT*YEAR / vaxis=axis1 haxis=axis2
noframe autovref;
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 uses the BWIDTH option on a SYMBOL statement with PROC GPLOT to specify the width of the boxes in a box plot. The BWIDTH option can also be used to specify the width of the bars in a HILOB plot.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Symbols/Interpolation Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Plots ==> Other Plots
|
Date Modified: | 2005-08-31 03:03:12 |
Date Created: | 2004-11-11 11:07:59 |
Operating System and Release Information
SAS System | SAS/GRAPH | All | n/a | n/a |