Sample 24926: Overlay reference lines on a log scale axis
goptions reset=all cback=white border;
%let max=100000;
data one;
input x y;
datalines;
1 10
2 50
3 2000
4 8000
5 6000
6 15000
7 10000
8 50000
9 100000
;
data anno;
retain xsys '1' ysys '2' color 'black' line 1;
do i=1 to 4;
cnt=0;
do yvar=10**i to 10**(i+1) by 10**i;
if (cnt=0 or yvar=&max) then size=3; else size=1;
function='move'; x=0; y=yvar; output;
function='draw'; x=100; y=yvar; output;
cnt+1;
end;
end;
run;
proc print;
run;
proc gplot data=one;
plot y*x / vaxis=axis1 anno=anno haxis=axis2;
symbol1 i=spline v=dot w=2 c=black r=6;
axis1 logbase=10 logstyle=expand minor=(n=8);
axis2 minor=none;
title1 h=1.25 'Y vs X';
run;
quit;

This program uses the ANNOTATE facilty to overlay reference lines at all major and minor tick marks of a GPLOT with a Log scale.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Reference Lines
|
| Date Modified: | 2005-08-31 03:03:19 |
| Date Created: | 2004-11-11 11:08:01 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |