[R] Superimposing Multiple Vectors Plots in One Figure

Gundala Viswanath gundalav at gmail.com
Fri Jun 27 08:25:55 CEST 2008


Hi,

I have 3 vectors which I want to plot as in one plot.
I was wondering why this code of mine only show the last vector:

__BEGIN__
library(lattice)

out_fname <- paste("MyPlot.png",sep="")

trellis.device("png", color=TRUE)
png(out_fname)
plot(vect1,type="l",col="red",xlab="Nof Genes", ylab="RMSD")
plot(vect2,type="l",col="blue")
plot(vect3,type="l",col="green")  # final graph only showed this one.
dev.off()

__END__

- Gundala Viswanath
Jakarta - Indonesia



More information about the R-help mailing list