Sample 24907: Overlay a 45 degree reference line on a scatter plot
goptions reset=all cback=white border;
data a;
input x y;
datalines;
1 30
2 15
3 40
4 80
5 35
6 40
7 85
8 75
9 55
10 30
;
data anno;
function='move'; xsys='1'; ysys='1'; x=0; y=0; output;
function='draw'; xsys='1'; ysys='1'; color='red'; x=100; y=100; output;
run;
proc gplot data=a;
plot y*x / anno=anno haxis=axis1 vaxis=axis2;
symbol1 i=none v=dot c=blue;
axis1 length=5 in; /* Changes the lengths to whatever */
axis2 length=5 in; /* you want. */
title1 h=1 f=simplex 'Ref Line at 45';
run;
quit;
This program uses the ANNOTATE facilty to overlay
a 45 degree reference line on a scatter plot.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Reference Lines
|
| Date Modified: | 2005-08-31 03:03:09 |
| Date Created: | 2004-11-11 11:07:58 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |