Skip to content
Prev 13462 / 398502 Next

inter tick distance

"niels Waller" <niels.waller at home.com> writes:
This is a tough one. I think I would

a) set xaxs and yaxs to "i"
b) set xlim and ylim 
c) set pin to be proportional to the chosen limits.


Try replacing the last bit of your example with

par(pin=c(6,6))
plot(c(-4,4),c(0,4),type="n",xaxs="i",yaxs="i",
xlim=c(-3,3),ylim=c(-1,5),axes=FALSE,xlab="",ylab="")
axis(side=1,pos=0,labels=FALSE)
axis(side=2,pos=0,labels=FALSE,at=c(0,1,2,3,4))
arrows(0,0,M[1,1],M[1,2],angle=20,length=.15,lwd=2)
arrows(0,0,M[2,1],M[2,2],angle=20,length=.15,lwd=2)