[R] inter tick distance

Uwe Ligges ligges at amadeus.statistik.uni-dortmund.de
Mon Sep 10 21:18:41 CEST 2001


niels Waller wrote:
> 
> R colleagues,
> 
> I am stumped. I would like the inter-tick distances to be the same on the x
> and y axes but cannot determine how to do so when the lower half of the y
> axis is not printed.  Thanks for any and all suggestions. (btw, setting
> par(pty="s")  does not solve my problem)
> 
> Niels Waller
> 
> M<-matrix(c(2,1,
>            -1,3),2,2,byrow=TRUE)
> 
> dimnames(M)<-list(c("P1","P2"),c("V1","V2"))
> 
> writeLines(text=c("\n","Matrix M"))
> print(M)


Let me add two lines:

  postscript("file.ps", width=3, height=3)

> plot(c(-4,4),c(0,4),type="n",xlim=c(-3,3),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)

  dev.off()


I think "inter-tick distance" *is* already the same in the postscript
file. 

For the windows() device (I don't know your OS) you can use
  windows(rescale="fit", xpinch=102, ypinch=77)
instead of postscript() but maybe xpinch/ypinch must be adjusted for
your system.

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list