[R] Superimposing Multiple Vectors Plots in One Figure

From: Gundala Viswanath <gundalav_at_gmail.com>
Date: Fri, 27 Jun 2008 15:25:55 +0900


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__


R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 27 Jun 2008 - 06:30:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 Jun 2008 - 11:31:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive