Skip to content
Prev 169917 / 398506 Next

how to use axes=FALSE to get multple plots?

Dan Kelley wrote:
axis() doesn't draw axis labels.  There isn't a simple function for 
drawing text on side 4 as far as I know, but mtext is not so bad:  use

mtext("Right label", side=4, line=3)

to emulate the default ylab, but put it on the right.  See ?title for 
more details if you've changed the default locations.

I don't like to use plot(new=TRUE), because there are lots of things 
that can go wrong when you overplot high level graphics (I'd use 
points() instead), but your example is one of the few cases where you 
can make just as many errors using points() as using par(new=TRUE).  Are 
you really sure you want a graph with two different scales on it?

Duncan Murdoch