From maechler at stat.math.ethz.ch  Fri Dec 29 11:28:39 2006
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Fri, 29 Dec 2006 11:28:39 +0100
Subject: [Rd] Fwd: [R] axis and times() problem
In-Reply-To: <Pine.LNX.4.64.0612280930001.11219@tajo.ucsd.edu>
References: <45924953.9070100@einthal.de>
	<971536df0612270432q6da9143cu8c0a611508ba39e7@mail.gmail.com>
	<459389EE.2030908@web.de>
	<971536df0612280134k4deb34aem3a650c8daa6f1004@mail.gmail.com>
	<Pine.LNX.4.64.0612280930001.11219@tajo.ucsd.edu>
Message-ID: <17812.60887.98978.129308@stat.math.ethz.ch>

>>>>> "ChuckB" == Charles C Berry <cberry at tajo.ucsd.edu>
>>>>>     on Thu, 28 Dec 2006 09:35:35 -0800 writes:

    ChuckB> On Thu, 28 Dec 2006, Gabor Grothendieck wrote:

    >> The axes do not intersect with this command.  Is it a bug?

not at all, as Chuck demonstrated below.

  >> plot(c(.51, .6), bty = "n", xaxs = "i", yaxs = "i")

BTW: The same, an epsilon more efficient and also a bit more
"self-documenting", would be 

 plot(c(.51, .6), frame.plot = FALSE, xaxs = "i", yaxs = "i")

    >> If I remove the bty = "n" then they do intersect.

    ChuckB> box() is making it look like the axes are different.

    ChuckB> Axis()/axis() is behaving the same way in both cases.

In other words, the axes typically do *not* intersect at all.
Because most plot() methods {and plot.default() specifically}
end up calling box() which draws a rectangle ("box") around the
plotting region, many users may have got the wrong
interpretation of  intersecting axes.

They are not, as Chuck's example nicely shows :

    >> par(mfrow=c(1,2))
    >> plot(c(.51, .6), bty = "n", xaxs = "i", yaxs = "i")
    >> box(lty=2)
    >> plot(c(.51, .6), xaxs = "i", yaxs = "i")
    >> axis(4,col=2)

    ChuckB> [...]

Martin Maechler, ETH Zurich



[Rd] Fwd: [R] axis and times() problem
Martin Maechler