[R] How to plot two graphs on one single plot?

2007-02-23 Thread Yun Zhang
Hi, I am trying to plot two distribution graph on one plot. But I dont know how. I set them to the same x, y limit, even same x, y labels. Code: x1=rnorm(25, mean=0, sd=1) y1=dnorm(x1, mean=0, sd=1) x2=rnorm(25, mean=0, sd=1) y2=dnorm(x2, mean=0, sd=1) plot(x1, y1, type='p',

Re: [R] How to plot two graphs on one single plot?

2007-02-23 Thread Yun Zhang
) | --- Is it possible to do that? Thanks, Yun Henrique Dallazuanna wrote: par(mfrow=c(2,1)) #your plot #after plot par(mfrow=c(1,1)) On 23/02/07, *Yun Zhang* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, I am trying to plot two distribution graph on one plot. But I

Re: [R] How to plot two graphs on one single plot?

2007-02-23 Thread Yun Zhang
=range(x1,x2), ylim=range(y1, y2), xlab='x', ylab='y') points(x2, y2, col=red) see ?lines ?points ?text ?abline Also, see the new option in par Best, Matt On 2/23/07, Yun Zhang [EMAIL PROTECTED] wrote: Hi, I am trying to plot two distribution graph on one plot. But I dont know how. I set