Sample 24918: Create four axes: left, right, top and bottom
goptions reset=all cback=white border;
data a;
input xvar yvar;
datalines;
1 10
2 20
4 40
5 60
6 80
9 50
10 30
;
data anno;
length function $8;
retain xsys '2' ysys '3' color 'black' when 'a';
do i=1 to 10 by .25;
if i/int(i)=1 then do;
tickhght=2;
text=left(put(i,2.));
end;
else do;
tickhght=1;
text='';
end;
function='move'; x=i; y=75; output;
function='draw'; x=i; y=75-tickhght; output;
function='label'; x=i; y=79; output;
end;
run;
proc print;
run;
symbol1 i=j v=dot c=blue;
axis1 origin=(15,15)pct major=(h=-1) minor=(n=4 h=-.5)
length=60 pct offset=(2,2);
axis2 origin=(75,15)pct major=(h=-1) minor=(n=4 h=-.5)
length=60 pct offset=(2,2);
axis3 origin=(15,15)pct major=(h=-.75) minor=(n=4 h=-.25)
order=(1 to 10 by 1) length=60 pct offset=(2,2);
proc gplot data=a;
plot yvar*xvar / vaxis=axis1 haxis=axis3 frame anno=anno;
plot2 yvar*xvar / vaxis=axis2;
title1 h=5 pct 'Four Axes';
run;
quit;

This program uses the ANNOTATE facilty to create the top axis,
and uses the PLOT2 statement to create the right axis.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Axis
|
| Date Modified: | 2005-08-31 03:03:15 |
| Date Created: | 2004-11-11 11:08:00 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |