[R] Troubles with plot margins

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed May 2 15:57:36 CEST 2001


On Wed, 2 May 2001, Marco Taboga wrote:

> I am trying to set the margins of a plot with mai and I get a strange output.
> I write:
> plot(rnorm(1000),type="l",mai=c(1,1,1,1))
> and what I get is a plot with unchanged margins and a column of four 1 plotted on the top margin.

mai matches main, which is an argument to plot.default.
It can't be set in plot, anyway.
> plot(rnorm(1000),type="l",mai=c(1,1,1,1), main=NULL)
Warning messages:
1: parameter "mai" couldn't be set in high-level plot() function
2: parameter "mai" couldn't be set in high-level plot() function
...

Use

par(mai=c(1,1,1,1))
plot(rnorm(1000))


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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



More information about the R-help mailing list