>
> Closing an X11 window is an interactive event:
>
> <http://rpy.sourceforge.net/rpy2/doc-2.1/html/rinterface.html#processing-interactive-events>
> http://rpy.sourceforge.net/
> rpy2/doc-2.1/html/rinterface.html#processing-interactive-events
Would be nice if there was a link to that on each example of the graphics in
the documentation or at least for the fist example.
Thanks for the reference
Something like this would be great.
import rpy2.robjects as robjects
import rpy2.rinterface as rinterface
import time
import threading
def r_refresh(interval = 0.03):
# Ctrl-C to interrupt
while True:
rinterface.process_revents()
time.sleep(interval)
t = threading.Timer(0.1, r_refresh)
t.start()
r = robjects.r
m = r.matrix(r.rnorm(100), ncol=5)
pca = r.princomp(m)
t.start(r.plot(pca, main="Eigen values"))
*Vincent Davis
720-301-3003 *
vinc...@vincentdavis.net
my blog <http://vincentdavis.net> |
LinkedIn<http://www.linkedin.com/in/vincentdavis>
On Sat, Apr 3, 2010 at 10:14 AM, Laurent <lgaut...@gmail.com> wrote:
> Closing an X11 window is an interactive event:
>
>
> http://rpy.sourceforge.net/rpy2/doc-2.1/html/rinterface.html#processing-interactive-events
>
>
> On 03/04/10 17:07, Vincent Davis wrote:
>
>> I am running on osx, and new to R and rpy2. I don't seem to be able to
>> close plots. for example from the introduction to rpy2
>>
>> import rpy2.robjects as robjects
>>
>> r = robjects.r
>>
>> x = robjects.IntVector(range(10))
>> y = r.rnorm(10)
>>
>> r.X11()
>>
>> r.layout(r.matrix(robjects.IntVector([1,2,3,2]), nrow=2, ncol=2))
>> r.plot(r.runif(10), y, xlab="runif", ylab="foo/bar", col="red")
>>
>>
>> I get a nice plot that opens in an x11 window but I can't close it. I
>> assume I am missing something obvious.
>>
>>
>>
>>
>> *Vincent Davis
>> 720-301-3003 *
>> vinc...@vincentdavis.net <mailto:vinc...@vincentdavis.net>
>>
>> my blog <http://vincentdavis.net> | LinkedIn
>> <http://www.linkedin.com/in/vincentdavis>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>>
>>
>>
>> _______________________________________________
>> rpy-list mailing list
>> rpy-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>>
>
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list