From paul@stat.auckland.ac.nz  Tue Jun 19 02:36:14 2001
From: paul@stat.auckland.ac.nz (paul@stat.auckland.ac.nz)
Date: Tue, 19 Jun 2001 03:36:14 +0200 (MET DST)
Subject: [Rd] par(mgp) bug (PR#916)
Message-ID: <200106190136.DAA15914@pubhealth.ku.dk>

Hi


> The behaviour of the third argument of par(mgp), which controls the
> placement of the axis ticks, is not working.
>
> In the following example, the plots should NOT be
> identical; the axis ticks plus the axis major line should be drawn one
> line out from the edges of the plot region.
>
> par(mfrow=c(2,1))
> plot(1:10)
> par(mgp=c(3,1,1))
> plot(1:10)


This is more of an incompatibility-with-S rather than a bug.  In R,
axis(pos=) overrides axis(line=) which overrides par(mgp=).  It is possible
to get axis to respond to par(mgp=), but this is NOT the default behaviour.
For example,

par(mgp=c(3, 1, 1))
plot(1:10, axes=F)
box()
axis(1, line=NA)
axis(2)

In S, par(mgp=) specifies locations RELATIVE TO axis(line=), which can be
overridden by axis(pos=).

So the options are:
(i) become compatible NOW (for 1.3)
(ii) become compatible later
(iii) remain incompatible

I think we should do (i), especially because the default behaviour, which I
think would cover 99.999% of user code, would NOT change.

This is your chance to disagree ...

Paul




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] par(mgp) bug (PR#916)
paul@stat.auckland.ac.nz