/*--- 斑竹江湖令 及时单骑赶到 ---*/
data a;
input x y @@;
cards;
1 2 2 4 3 8 4 9 5 13
;
data anno;
length function $ 8;
retain xsys '2' ysys '3' color 'black' when 'a';
do i= 0 to 15 by .25;
if (i+1)/int(i+1)=1 then
do;
tkht=2;
text=left(put(i,2.));
end;
else
do;
tkht=1;
text='';
end;
function='move'; y=i; x=1.5; output;
function='draw'; y=i; x=1.5-tkht/20; output;
function='label'; y=i; x=1.5; output;
end;
run;
title1 "Move the Y axis to the middle of the graph";
axis1 origin=(15,15)pct major=none minor=none length=60pct
order=(0 to 15 by 5) offset=(0,0) label=none value=none color=white;
axis2 origin=(45,15)pct major=(h=-1) minor=(n=3 h=-.5) length=60pct
order=(0 to 15 by 5) offset=(0,0);
axis3 origin=(15,15)pct major=(h=-1) minor=none length=60 pct
order=(-2 to 5 by 1) offset=(0,0) label=none ;
symbol1 i=j v=dot c=blue;
proc gplot data=a;
plot y *x / vaxis=axis1 haxis=axis3 noframe href=1.5 vref=0 ;
plot2 y *x / vaxis=axis2 ;
run;
quit;