R - posición de consulta de la ventana de gráficos/trazado

Is it possible to ask a plot window for its position in R?

I'm doing some plotting whereby a number of windows get successively opened, and it would be useful if these appeared at the same position and with the same size as previous graph windows for quick comparison.

I can get the size of a window via dev.size and set the size of subsequent windows with this.

However, how can I get the position of the window?

(Imagine the first graph pops up - the user moves and resizes it to suit them. All subsequent windows should appear at that position/size so it almost looks like an animation, making it easier to tell what has changed between subsequent graphs.

I can't simply use the same graph window and graph over the top of it, because sometimes I want to remove lines from the graph (keeping all else the same) as opposed to adding them.)

preguntado el 04 de julio de 12 a las 03:07

And if you switch on graph history, you get the same for free; or use RStudio, where this feature is default. -

1 Respuestas

As I recall you cannot do this as "R does not know", only the window manager does and there is no callback mechanism between the window manager and the application, ie R, that is passed through to us as application level developers.

Respondido 04 Jul 12, 04:07

OK, I figured it might be something like that. Turns out in my particular case I was able to just re-use the same plot device over and over (the user got back to me - they just want one plot window rather than one per iteration which I previously thought they did) - café matematico

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.