Sample 24930: Label data points with PROC GPLOT and the POINTLABEL option
The sample code on the Full Code tab uses PROC GPLOT and the POINTLABEL option in a SYMBOL statement to label the points on a 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 PROC GPLOT and the POINTLABEL option in a SYMBOL statement to label the plot points.
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 data set for plotting */
data a;
input MONTH SALES;
datalines;
1 52
2 16
3 78
4 14
5 26
6 31
7 92
8 19
9 18
10 22
11 84
12 93
;
run;
/* Use the POINTLABEL option to label the plot points */
symbol1 interpol=join value=dot color=vibg height=1.3
pointlabel=(height=10pt '#sales');
title1 'Using the POINTLABEL Option with GPLOT';
axis1 offset=(4,4) minor=none;
axis2 offset=(2,2) minor=none;
proc gplot data=a;
plot sales*month / haxis=axis1 vaxis=axis2 noframe;
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 PROC GPLOT and the POINTLABEL option on a SYMBOL statement to label the plot points.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Plots ==> Line
|
Date Modified: | 2018-02-01 11:20:44 |
Date Created: | 2004-11-11 11:08:02 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9 TS M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
Microsoft Windows XP Professional | 9 TS M0 | |
64-bit Enabled AIX | 9 TS M0 | |
64-bit Enabled HP-UX | 9 TS M0 | |
64-bit Enabled Solaris | 9 TS M0 | |
HP-UX IPF | 9 TS M0 | |
Linux | 9 TS M0 | |
OpenVMS Alpha | 9 TS M0 | |
Tru64 UNIX | 9 TS M0 | |