On Tue, 1 Feb 2011 14:20:51 +0900
 Gundala Viswanath <gunda...@gmail.com> wrote:
> 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.
> 

Hello Gundala,
If these are fairly simple plots (i.e. curve, points, bar, step) you
can arrange your data as columns in a matrix and use matplot().

matplot(vectorOfxValues, FooBarAsMatrix, lwd=2, lty=3, col=c("red",
"blue"))
legend(0.6,0.6,c('Default','Probabilistic'), col=c('red','blue'),lwd=3)

Regards,
Edwin
-- 
Dr. Edwin Groot, postdoctoral associate
AG Laux
Institut fuer Biologie III
Schaenzlestr. 1
79104 Freiburg, Deutschland
+49 761-2032945

______________________________________________
R-help@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.

Reply via email to