From ligges at statistik.tu-dortmund.de  Sun Sep 27 17:49:03 2009
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Sun, 27 Sep 2009 17:49:03 +0200
Subject: [Rd] xaxs disactivated when asp=1 in plots (PR#13971)
In-Reply-To: <20090925205517.50797282EF56@mail.pubhealth.ku.dk>
References: <20090925205517.50797282EF56@mail.pubhealth.ku.dk>
Message-ID: <4ABF896F.6080505@statistik.tu-dortmund.de>

Not a bug, see ?plot.window that tells us:
asp:
If asp is a finite positive value then the window is set up so that one 
data unit in the x direction is equal in length to asp * one data unit 
in the y direction.

Note that in this case, par("usr") is no longer determined by, e.g., 
par("xaxs"), but rather by asp and the device's aspect ratio. (See what 
happens if you interactively resize the plot device after running the 
example below!)


Best,
Uwe Ligges



francois_birgand at ncsu.edu wrote:
> Full_Name: Fran?ois Birgand
> Version: 2.9.0
> OS: windows xp
> Submission from: (NULL) (152.1.16.161)
> 
> 
> When I type this sequence:
> 
> x11()
> Ylim<-c(0,14)
> Xlim<-c(0,14)
> plot(0,0,xlim=Xlim,ylim=Ylim,col="white",main="",xlab="",ylab="",bty="n",xaxt="n",yaxt="n",xaxs="i",yaxs="i",asp=1)
> abline(h=c(0,14),lwd=2,col="grey")
> abline(v=c(0,14),lwd=2,col="grey")
> par(new=TRUE)
> abline(h=seq(0,14,by=0.2),lty=3,col="grey")
> abline(h=seq(0,14,by=1),lty=1,col="grey")
> abline(v=seq(0,14,by=0.2),lty=3,col="grey")
> abline(v=seq(0,14,by=1),lty=1,col="grey")
> par(new=TRUE)
> 
> only yaxs="i" is taken into account while xaxs="i" is ignored.  When I remove
> asp=1, xaxs="i" is activated again.
> Small bug but kind of bothersome...!!
> 
> Congratulations for the great work you guys are doing!
> Fran?ois
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] xaxs disactivated when asp=1 in plots (PR#13971)
Uwe Ligges