[R] How to Plot Two Curves Into One Page

Gundala Viswanath gundalav at gmail.com
Tue Feb 1 06:20:51 CET 2011


I have a R script that contain these lines for plotting:

plot(foo,lwd=2,lty=3,col="red", main="");
plot(bar,lwd=2,lty=3,col="blue");
legend(0.6,0.6,c('Default','Probabilistic'), col=c('red','blue'),lwd=3);


But it generate 1 file (Rplot.pdf) with two pages. Each page for 1 plot.
Is there a way I can put them together in to one page?

- G.V.



More information about the R-help mailing list