Sample 24866: Format the sumvar variable
/* Format the Sumvar Variable Using PROC FORMAT */
/* Set graphics options */
goptions reset=all border vpos=30 hpos=50;
/* Create a format for the values of Y */
proc format;
picture formy 0 = '9%'
.01-99.999 = '00.0%';
run;
/* Create input data set, A */
data a;
input x y;
datalines;
1 32.000
2 20.25
3 3.725
;
/* Define patterns for the bars */
pattern v=s c=blue;
/* Add the title */
title 'Format Sumvar';
/* Produce the block chart */
proc gchart;
block x / sumvar=y discrete noheading;
format y formy7.1; /* The FORMAT statement applies the */
run; /* FORMY. format to the value of Y */
quit;
Format the sumvar variable using PROC FORMAT.
| 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 |