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. Marco Taboga (mtaboga at tiscalinet.it) -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010502/00d0e5dd/attachment.html
> 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.In plot(..., mai = ...) , R thinks mai is short for "main" and sets c(1, 1, 1, 1) as the main title. What you should try: par(mai = rep(1, 4)) plot(...) Uwe -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Reasonably Related Threads
- Building shared libraries under Windows
- Re: [R] Crazy plots of time-series against dates (PR#930)
- controlling usage of digits & scientific notation in R plots; postscript margins
- R Graphics Device margins
- "figure margins too large" in RGtk2 drawing area as cairo device - why?