Skip to content

Troubles with plot margins

3 messages · Marco Taboga, Uwe Ligges, Brian Ripley

#
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
#
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:

            
mai matches main, which is an argument to plot.default.
It can't be set in plot, anyway.
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))