Re: [R] Plotting two overlapping curves

2009-07-30 Thread Dimitris Rizopoulos
one way is the following: x <- seq(-2, 2, len = 11) y1 <- 2*x^2 + 3*x + 1 y2 <- - 2*x^2 - 3*x + 1 plot(x, y1, type = "l", col = "red", ylim = range(y1, y2)) lines(x, y2, col = "blue") I hope it helps. Best, Dimitris njhuang86 wrote: Hi. Sorry if this question might have already been asked.

[R] Plotting two overlapping curves

2009-07-30 Thread njhuang86
Hi. Sorry if this question might have already been asked... I'm trying to plot two curves on the same X-Y coordinate. The par(mfrow) command allows me to plot the two curves on the same window however on different coordinate systems. Is there a way to force the two curves into the same coordinate