Re: [R] adding new devices and plots

2010-07-30 Thread Jim Lemon

On 07/30/2010 04:15 AM, Erin Hodgess wrote:

Dear R People:

I have the following function:


eplot

function (x)
{
 plot(x)
 z- locator(2)
 dev.new()
 plot(window(x, start = min(z$x), end = max(z$x)))
}




I want to generate a new plot from a subset of the original, but I
want to keep the original plot up.  When I use this, it opens a new
window, but the first device goes blank.


Hi Erin,
Maybe you want something like zoomInPlot (plotrix).

Jim

__
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.


[R] adding new devices and plots

2010-07-29 Thread Erin Hodgess
Dear R People:

I have the following function:

 eplot
function (x)
{
plot(x)
z - locator(2)
dev.new()
plot(window(x, start = min(z$x), end = max(z$x)))
}


I want to generate a new plot from a subset of the original, but I
want to keep the original plot up.  When I use this, it opens a new
window, but the first device goes blank.

Is there a way around this, please?

Thank you!
Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

__
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.


Re: [R] adding new devices and plots

2010-07-29 Thread Greg Snow
It is possible that the plot function starts to plot before the new device is 
fully in place, you could try sleeping for a second or 2 between the call to 
dev.new and the call to plot.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111


 -Original Message-
 From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
 project.org] On Behalf Of Erin Hodgess
 Sent: Thursday, July 29, 2010 12:16 PM
 To: R help
 Subject: [R] adding new devices and plots
 
 Dear R People:
 
 I have the following function:
 
  eplot
 function (x)
 {
 plot(x)
 z - locator(2)
 dev.new()
 plot(window(x, start = min(z$x), end = max(z$x)))
 }
 
 
 I want to generate a new plot from a subset of the original, but I
 want to keep the original plot up.  When I use this, it opens a new
 window, but the first device goes blank.
 
 Is there a way around this, please?
 
 Thank you!
 Sincerely,
 Erin
 
 
 --
 Erin Hodgess
 Associate Professor
 Department of Computer and Mathematical Sciences
 University of Houston - Downtown
 mailto: erinm.hodg...@gmail.com
 
 __
 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.

__
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.