[R] axes=F with pairs()

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Aug 30 16:23:58 CEST 2004


On Mon, 30 Aug 2004, Henrik Andersson wrote:

> If I want to fiddle with the axes, I normally plot things like this for 
> instance
> 
> plot(1:5,axes=F)
> axis(2,labels=letters[1:5])
> 
> BUT, if I want to do remove the axes from a scatter plot matrix using i.e.
> 
> pairs(cbind(runif(10),runif(10)),axes=F)
> 
> I get
> 
> Error in plot.default(x[, j], x[, i], xlab = "", ylab = "", axes = 
> FALSE,  :
> 	formal argument "axes" matched by multiple actual arguments

As always, PLEASE read the help page before posting:

      ...: graphical parameters can be given as arguments to 'plot'.

and `axes' is *not* a graphical parameter (see ?par).

> How do I remove the axes ?

Use graphical parameters, as it says.  As in

pairs(~Fertility + Education + Catholic, data = swiss, 
      subset = Education < 20, main = "Swiss data, Education < 20",
      xaxt = "n", yaxt = "n")

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list