Wednesday, September 15, 2010

Plot 2 graf density dalam satu graf

Kat sini rujukannya:

1. http://tolstoy.newcastle.edu.au/R/help/06/08/33541.html
2. http://learnr.wordpress.com/2009/03/16/ggplot2-plotting-two-or-more-overlapping-density-plots-on-the-same-graph/
3. http://www.statmethods.net/graphs/density.html
4. http://www.mail-archive.com/r-help@r-project.org/msg77489.html

Ini untuk fusion dataset, plot ANN_PREDICTED untuk TARGET = 0 dan 1

> d1<-density(ann0_notarget)
> d2<-density(ann1_notarget)
> plot(range(d1$x,d2$x),range(d1$y,d2$y),type="n",xlab="x",ylab="Density")
> lines(d1,col="red")
> lines(d2,col="blue")

No comments:

Post a Comment