Re: [R] plot focus - another issue (ylim)

2010-06-30 Thread pdb
Thanks Henrique, that appeared to work, but now I have another issue. If I add a ylim to the plot then when I plot another line it gets plotted on the wrong scale. #this works as expected plot(iris[,1],col="red",ylim=c(-10,10)) #plot1 lines(iris[,4],col="black") #this does not par(mfrow=c(2,1

Re: [R] plot focus

2010-06-30 Thread Henrique Dallazuanna
Try this: par(mfg = c(1, 1)) lines(iris[,4],col="black") On Wed, Jun 30, 2010 at 7:26 AM, pdb wrote: > > I am doing calculations in a loop and then plotting the results by adding a > point to each of 2 charts at the end of the loop. Its very informative as > you can see the progression through

Re: [R] plot focus

2010-06-30 Thread Greg Snow
I would generally write a function to create the entire first plot, then the entire 2nd plot based on data or other arguments passed in, then in your loop or whatever call the function with the different steps. This will recreate the plots from scratch at each step rather than adding to the exis

Re: [R] plot focus

2010-06-30 Thread Peter Ehlers
On 2010-06-30 8:38, Tal Galili wrote: Good question pdb, I would suggest you to use: par(bg = "white") In the beginning of the code, But it doesn't solve the general problem of how to get the "lines" to be properly aligned. I am curious for the answer from betteR people. Best, Tal Instead

Re: [R] plot focus

2010-06-30 Thread Tal Galili
Good question pdb, I would suggest you to use: par(bg = "white") In the beginning of the code, But it doesn't solve the general problem of how to get the "lines" to be properly aligned. I am curious for the answer from betteR people. Best, Tal Contact Details:--

Re: [R] plot focus

2010-06-30 Thread Peter Ehlers
You could just open two devices. See ?dev.cur for an example. -Peter Ehlers On 2010-06-30 4:26, pdb wrote: I am doing calculations in a loop and then plotting the results by adding a point to each of 2 charts at the end of the loop. Its very informative as you can see the progression through