Re: [R] Two plots with two different Y labels

2012-03-01 Thread Jim Lemon
On 03/01/2012 07:13 PM, Alaios wrote: Dear all, I would like to place into a same plot two plots. Their y values though are different a lot (first series has around -100 y values and the second one slightly over 1). The x value are the same. I would like to have in the same plot (under the same

Re: [R] Two plots with two different Y labels

2012-03-01 Thread Dimitris Rizopoulos
Try this: set.seed(123) x <- 1:5 y1 <- rnorm(5) y2 <- rnorm(5) par(mar = c(5,4,5,4)) plot(x, y1, xlab = "x-axis", ylab = "y-axis", type = "l") par(new = TRUE) plot(x, y2, axes = FALSE, yaxs = "i", type = "l", ann = FALSE, col = 2) axis(4, las = 2) mtext("z-axis", 4, 2) I hope it helps. Bes

[R] Two plots with two different Y labels

2012-03-01 Thread Alaios
Dear all, I would like to place into a same plot two plots. Their y values though are different a lot (first series has around -100 y values and the second one slightly over 1). The x value are the same. I would like to have in the same plot (under the same x,y axis the two plots). Is it possibl