[R] Exporting a Graph that has lines()

From: R_Learner <sschiang8_at_gmail.com>
Date: Thu, 03 Jul 2008 13:14:55 -0700 (PDT)

I'm trying to export a graph (any form is good). I'm trying to export one that uses plot() then lines(). however, it seems that the jpeg format and the pdf format only takes the first line plot, and doesn't even consider the additional plots. My code is the following:         

output_file<-paste(filez,".pdf",sep="")
pdf(output_file)
plot((x_data) ~ (y_data), main = filez)
lines (x,z,col="red")
dev.off()

The pdf only comes out with the graph of the plot, and not of the lines. Does anyone know how to export multiple graph items on one plot?

Thanks!

-- 
View this message in context: http://www.nabble.com/Exporting-a-Graph-that-has-lines%28%29-tp18267441p18267441.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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 Thu 03 Jul 2008 - 20:29:04 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 Thu 03 Jul 2008 - 21:32:09 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