I am trying to plot two things on one graph, with a y-axis at the left for
one variable, and a y-axis at the right, for the other variable.  I thought
I could do as follows


par(mar=rep(4.5, 4))
plot(0:10, 10:20)
par(new=TRUE)
plot(0:10, 100:110, axes=FALSE)
axis(4)


but this writes both y-axis labels on the left-hand side, and nothing on the
right-hand side.  This is R 2.8.1 (2008-12-22) on OS-X.

Am I missing something?  

PS. I know that I can just make ylab="" and draw the right-hand axis name
with mtext, but that then I would need to check par(mgp), to find where
place it, etc.  I'm thinking that I am just missing something in my
understanding.


-- 
View this message in context: 
http://www.nabble.com/how-to-use-axes%3DFALSE-to-get-multple-plots--tp21934005p21934005.html
Sent from the R help mailing list archive at Nabble.com.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to