Chapter Contents

Previous

Next
The PLOT Procedure

Example 9: Adding Labels to a Plot


Procedure features:
PLOT statement
label variable in plot request
Data set: EDUCATION

This example shows how to modify the plot request to label points on the plot with the values of variables. This example adds labels to the plot shown in Plotting BY Groups .


Program

options nodate pageno=1 linesize=80 pagesize=35;
 Note about code
proc sort data=education;
   by region;
run;
 Note about code
proc plot data=education;
   by region;
 Note about code
   plot expenditures*dropoutrate='*' $ state / href=28.6;
   title 'Plot of Dropout Rate and Expenditure Per Pupil';
run;




Output
PROC PLOT produces a plot for each BY group. Only the plots for Midwest and Northeast are shown. [HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.