[R] How to plot two different lines with different color with the same "plot" function?
Petr Pikal
petr.pikal at precheza.cz
Wed Nov 23 11:26:58 CET 2005
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
More information about the R-help
mailing list