Sample 24866: Format the SUMVAR variable when using the BLOCK statement with PROC GCHART
This example demonstrates how to use a PICTURE format to format the SUMVAR variable when using the BLOCK statement with PROC GCHART.
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 demonstrates how to use a PICTURE format to format the SUMVAR variable when using the BLOCK statement with PROC GCHART.
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 up the graphics environment */
goptions reset=all border cback=white
htitle=13pt htext=11pt
ftext="Arial/bold";
/* Create a picture format for the values of Y */
proc format;
picture formy 0 = '9%'
.01-99.999 = '00.0%';
run;
/* Create the input data set */
data a;
input X Y;
datalines;
1 32.000
2 20.25
3 3.725
;
run;
/* Add a title to the graph */
title1 'Using a picture format with a block chart';
/* Produce the block chart */
proc gchart;
block x / sumvar=y discrete noheading;
format y formy7.1;
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 demonstrates how to use a PICTURE format to format the SUMVAR variable when using the BLOCK statement with PROC GCHART.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GCHART Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Charts ==> Block
|
Date Modified: | 2005-08-24 16:06:25 |
Date Created: | 2004-11-11 11:07:52 |
Operating System and Release Information
SAS System | SAS/GRAPH | All | n/a | n/a |