Procedure features: |
ID statement |
PLOT statement arguments:
|
using a plotting symbol |
|
AXIS= | |
|
Other features: |
LABEL statement |
PROC FORMAT |
SAS system options:
|
|
Data set: |
SALES
|
This example
-
specifies the character to
use as the plotting symbol
-
specifies the minimum and maximum values for the horizontal axis
as well as the interval represented by each print position
-
provides context for the points in the plot by printing in the
listing the values of two variables that are not in the plot
-
uses a variable's label as a column heading in the listing
-
creates and uses a permanent
format.
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
libname proclib 'SAS-library'; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
options nodate pageno=1 linesize=80 pagesize=60
fmtsearch=(proclib); |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
proc format library=proclib;
value monthfmt 1='January'
2='February';
run; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
proc timeplot data=sales;
plot icebox='R' / axis=2500 to 3600 by 25; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
id month week; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
label icebox='Refrigerator';
|
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
format month monthfmt.; |
![Note about code](../../../../common/63294/HTML/default/images/snbut.gif) |
title 'Weekly Sales of Refrigerators';
title2 'for the';
title3 'First Six Weeks of the Year';
run; |
![Note about figure](../../../../common/63294/HTML/default/images/snbut.gif) |
Weekly Sales of Refrigerators 1
for the
First Six Weeks of the Year
Month Week Refrigerator min max
2500 3600
*---------------------------------------------*
January 1 3450.94 | R |
January 1 2520.04 | R |
January 2 3240.67 | R |
January 2 2675.42 | R |
January 3 3160.45 | R |
January 3 2805.35 | R |
January 4 3400.24 | R |
January 4 2870.61 | R |
February 1 3550.43 | R |
February 1 2730.09 | R |
February 2 3385.74 | R |
February 2 2670.93 | R |
*---------------------------------------------*
| |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.