Re: [R] Graphics - plotting two graphs

2007-10-24 Thread Tim Smith
Hi all, I think you are both right. Multiple scales are not a good idea. I think I'll go with the two graphs idea that John suggested. It is way better than trying to superimpose two scales. thanks a lot!! Tim Scionforbai <[EMAIL PROTECTED]> wrote: plot(x1,y1,"b",xlim=range(x1), ylim=c(0, 1

Re: [R] Graphics - plotting two graphs

2007-10-24 Thread Scionforbai
plot(x1,y1,"b",xlim=range(x1), ylim=c(0, 170),pch=16,cex=2,axes=FALSE,ann=FALSE) par(col="grey50", fg="grey50", col.axis="grey50") axis(1, at=seq(0, 16, 4)) axis(2, at=seq(0, 170, 10)) axis(4, at=seq(0, 170, 10)) par(new=TRUE) plot(x2,y2,"b",xlim=range(x2), ylim=c(0, 170),pch=21,cex=2,axes=FALSE,an

Re: [R] Graphics - plotting two graphs

2007-10-24 Thread John Kane
It is not at all clear what you are trying to do. However does this do something like what you want? I just ignored the second y-axis as it is redundent. I have not been able to figure out what all the par calls were intended to do. x1 <- c(2, 4, 6, 8, 10, 12) x2 <- c(10, 20, 30, 40, 50, 60) y1

[R] Graphics - plotting two graphs

2007-10-24 Thread Tim Smith
Hi, I wanted to plot 2 lines on a single graph. Each graph has one axis that can be common. The code that I'm using is: --- par(mfrow=c(1, 1)) x1 <- c(2, 4, 6, 8, 10, 12) x2 <- c(10, 20, 30, 40, 50, 60) y1 <- c(10,12,15,22,34,21) y2 <- c(40,