[R] graph

Gabor Csardi csardi at rmki.kfki.hu
Wed Jun 14 19:35:12 CEST 2006


On Wed, Jun 14, 2006 at 07:23:53PM +0200, Ahmed Elhabti wrote:
[...]
>   Hi,
>   I want to know how I can have  with R two graphs in only one graph?
>   Example
>    
>   x<-seq(0,4,0.1)
>   plot(x,dnorm(x),type="l")     
>   plot(x,dgamma(x,2,0.5),typ="p")

in the last line, use 'points' instead of 'plot':

x<-seq(0,4,0.1)
plot(x,dnorm(x),type="l")     
points(x,dgamma(x,2,0.5),type="p")

Gabor

>   Thanks
[...]

-- 
Csardi Gabor <csardi at rmki.kfki.hu>    MTA RMKI, ELTE TTK



More information about the R-help mailing list