program axisx implicit none call init call viewport(0.2,0.2,0.8,0.8) call xyworld(-1.2,-1.2,1.2,1.2) call xaxis(-1.0,0.0,1.0,0.0,2,10) call fin stop end subroutine xaxis(x1,y1,x2,y2,m,n) implicit none real(4) x1,y1,x2,y2 integer m,n integer i real(4) s,d,x,dx,dy call setgray(0.0) s=(x2-x1)*(x2-x1)+(y2-y1)*(y2-y1) s=sqrt(s) d=s/real(60) call arrow(x1-s/20.0,y1,x2+s/20.0*2.0,y2,d) do i=0,m*n x=1.0/real(m*n)*real(i) if(i/n*n==i)then dy=0.02 else dy=0.01 end if call line(-x,-dy,-x,dy) call line(x,-dy,x,dy) end do call stroke call textx(x2+s/10.0*2.0,-s/30.0,'x') call textx((x1+x2)/2.0,(y1+y2)/2.0,'O') call textx(x2/2.0,y2,'pi/2') call textx(x2,y2,'pi') call textx(x1/2.0,y1,'-pi/2') call textx(x1,y1,'-pi') call stroke return end