[Rd] par(mgp) - unexpected behaviour (PR#6046)
Uwe Ligges
ligges at statistik.uni-dortmund.de
Wed Dec 24 13:04:09 MET 2003
BoersN at pac.dfo-mpo.gc.ca wrote:
>
> Full_Name: Nicholas Boers
> Version: 1.8.1
> OS: Windows XP Home Edition, Debian GNU/Linux 3.0
> Submission from: (NULL) (24.68.84.10)
>
> mgp[2] specifies the axis labels' margin line relative to that of the axis line
> (mgp[3]). The `par' help does not document this behaviour.
>
> The following code demonstrates my observation:
> plot.new();
> par(mgp = c(3, 2, 1));
> box();
> title(xlab = "x");
> axis(1);
>
> Based on the R documentation, combined with S-PLUS' behaviour, I would expect R
> to plot the axis labels and title at lines 2 and 3, respectively. However, it
> plots both at line 3.
>
> The relevant section of the `par' documentation states:
> 'mgp' The margin line (in 'mex' units) for the axis title, axis
> labels and axis line. The default is 'c(3, 1, 0)'.
>
> Thank-you for your time and considering this bug report.
The margin line number of axis labels is *relative* to the line number
of the axis line, hence not a bug (or if a bug, then a too sparse
documentation of par(mgp)).
Uwe Ligges
BTW: Don't submit bug reports twice (already submitted as PR#6045
before).
More information about the R-devel
mailing list