[Rd] par(mgp) - unexpected behaviour (PR#6045)

BoersN at pac.dfo-mpo.gc.ca BoersN at pac.dfo-mpo.gc.ca
Wed Dec 24 05:49:43 MET 2003


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.



More information about the R-devel mailing list