广星
2005-Nov-23 08:59 UTC
[R] How to plot two different lines with different color with the same "plot" function?
Hi,R_Help! I have done something like this:>x<-seq(412,612,1) >plot(x,dpois(x,512),col="blue",type="l") >plot(x,dnorm(x,512,sd=sqrt(512)),col="red",type="l")And now,I want to plot the two lines in the same picture or with the same "plot" action? What should I do? And any advises? Thank you in advance! 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭伖併佇伹 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭guangxing at ict.ac.cn 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭2005-11-23
Uwe Ligges
2005-Nov-23 09:37 UTC
[R] How to plot two different lines with different color with the same "plot" function?
伖併佇伹 wrote:> Hi,R_Help! > I have done something like this: > >>x<-seq(412,612,1) >>plot(x,dpois(x,512),col="blue",type="l") >>plot(x,dnorm(x,512,sd=sqrt(512)),col="red",type="l") > > And now,I want to plot the two lines in the same picture or with the same "plot" action? > What should I do? > And any advises?Please read the psoting guide. It points you to the mailing list archives where this question has been answered hundreds of times. Uwe Ligges> Thank you in advance! > > > 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭伖併佇伹 > 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭guangxing at ict.ac.cn > 仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭仭2005-11-23 > > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Petr Pikal
2005-Nov-23 10:26 UTC
[R] How to plot two different lines with different color with the same "plot" function?
On 23 Nov 2005 at 16:59, ???????? wrote: Date sent: Wed, 23 Nov 2005 16:59:38 +0800 From: "????????" <guangxing at ict.ac.cn> To: "R-help at stat.math.ethz.ch" <R-help at stat.math.ethz.ch> Subject: [R] How to plot two different lines with different color with the same "plot" function?> Hi,R_Help! > I have done something like this: > >x<-seq(412,612,1) > >plot(x,dpois(x,512),col="blue",type="l") > >plot(x,dnorm(x,512,sd=sqrt(512)),col="red",type="l") > And now,I want to plot the two lines in the same picture or with the > same "plot" action?What should I do? And any advises? Read some intro manuals. Read help page for plot where you can find section see also. Read help page for line. If you still do not know how to plot line in existing plot, search help archives, read posting guide and as a last resort post your question again. HTH Petr> > Thank you in advance! > > > ???????????????????????????????????????? > ????????????????????????????????guangxing at ict.ac.cn > ????????????????????????????????????????2005-11-23 > >Petr Pikal petr.pikal at precheza.cz