Re: [R] getting multiple plots on a single plot

2012-03-22 Thread Vihan Pandey
On 22 March 2012 21:06, David Winsemius wrote: > > On Mar 22, 2012, at 3:18 PM, Vihan Pandey wrote: > >> Hi all, >> >> I have the following R script : >> >> >> #!/usr/bin/Rscript >> >> out_file = "hybrid.pdf" >> pdf(out_file, height=8.5, width=11) > > > At this point (assuming that you want three

Re: [R] getting multiple plots on a single plot

2012-03-22 Thread Vihan Pandey
On 22 March 2012 20:54, Chris Snook wrote: > vihan, > > you jsut need to add the following statement in the subsequent plot > commands: > > add = TRUE > > so that your second and later plot commands look similar to: > > plot(myvalues_5M$num_sims_per_thread,myvalues_5M$time_per_sim,xlab="Number > o

Re: [R] getting multiple plots on a single plot

2012-03-22 Thread Vihan Pandey
On 22 March 2012 20:23, R. Michael Weylandt wrote: > Don't use plot three times -- it opens a new page when pdf() is your > current device. Do the first with plot -- then use lines() online from > there to the end. Thanks a million that did the job! :-) Cheers! - vihan > > Michael > > On Thu,

Re: [R] getting multiple plots on a single plot

2012-03-22 Thread David Winsemius
On Mar 22, 2012, at 3:18 PM, Vihan Pandey wrote: Hi all, I have the following R script : #!/usr/bin/Rscript out_file = "hybrid.pdf" pdf(out_file, height=8.5, width=11) At this point (assuming that you want three separate plots on the same page which is unclear but you do use different t

Re: [R] getting multiple plots on a single plot

2012-03-22 Thread Chris Snook
vihan, you jsut need to add the following statement in the subsequent plot commands: add = TRUE so that your second and later plot commands look similar to: plot(myvalues_5M$num_sims_per_thread,myvalues_5M$time_per_sim,xlab="Number of Simulations per Thread",ylab="Time per 1 million Simulations

Re: [R] getting multiple plots on a single plot

2012-03-22 Thread R. Michael Weylandt
Don't use plot three times -- it opens a new page when pdf() is your current device. Do the first with plot -- then use lines() online from there to the end. Michael On Thu, Mar 22, 2012 at 3:18 PM, Vihan Pandey wrote: > Hi all, > > I have the following R script : > > > #!/usr/bin/Rscript > > ou

[R] getting multiple plots on a single plot

2012-03-22 Thread Vihan Pandey
Hi all, I have the following R script : #!/usr/bin/Rscript out_file = "hybrid.pdf" pdf(out_file, height=8.5, width=11) myvalues_1M <- read.csv("hybrid_sims_1M.csv",head=TRUE,sep=",") plot(myvalues_1M$num_sims_per_thread,myvalues_1M$time_per_sim,xlab="Number of Simulations per Thread",ylab="Tim