On Thu, Jul 23, 2009 at 2:44 PM, Laurent Gautier<lgaut...@gmail.com> wrote: > I am curious to hear whether this is changing much, since the win32-specific > fix proposed has been implemented since 2.0.3 > (http://rpy.sourceforge.net/rpy2/doc/html/changes.html#new-features)
Yes, that works, too. > > You can also see it for yourself here: > http://bitbucket.org/lgautier/rpy2/src/6c793f1f1a37/rpy/rinterface/rinterface.c#cl-422 > > The intriguing part is that it works with IDle but not with the (DOS) > console (note that your bug report mentioned that at the time it was not > working with IDle). The plot window isn't fully responsive in IDLE, too, with the solution of "threading". As far as I know, R_ProcessEvents should be called from a main thread. From the R FAQ: 7.7 The console freezes when my compiled code is running. ========================================================= The console, pagers and graphics window all run in the same thread as the R engine. To allow the console etc to respond to Windows events, call `R_ProcessEvents()' periodically from your compiled code. If you want output to be updated on the console, call `R_FlushConsole()' and then `R_ProcessEvents()'. > > > L. > > > > June Kim wrote: >> >> Look at how I solved that problem. I have no problem with plot window >> currently. >> >> >> http://sourceforge.net/tracker/?func=detail&atid=453021&aid=1944503&group_id=48422 >> >> >> >> On Wed, Jul 22, 2009 at 12:45 AM, wayne jones<wayne_be...@hotmail.com> >> wrote: >>> >>> Hi Everyone, >>> >>> I am trying to run the following simple script to test R graphics using >>> rpy2: >>> >>> >>> import rpy2.robjects as robjects >>> r = robjects.r >>> m = r.matrix(r.rnorm(100), ncol=5) >>> pca = r.princomp(m) >>> r.plot(pca, main="Eigen values") >>> >>> >>> If I run this script from Idle everything works fine. >>> >>> However if I run this script line by line in the python terminal window >>> then >>> the graphics appears but no graph is displayed and when I try to move or >>> resize the >>> plot it fails and eventually crashes Python. >>> >>> If I run the script by just double clicking the script file, the graph >>> does >>> appear this time >>> but exhibits strange resizing properties, such as only only being >>> patrially >>> displayed when the >>> window is maximised. Furthermore the graphics menus (such as file->save >>> as->jpeg) crash the >>> R graphics window. >>> >>> I am very new to Python and rpy2 but have a good deal of experience with >>> R. >>> >>> Am I missing something? Any help would be appreciated. >>> >>> >>> My setup is: >>> >>> OS: Windows XP >>> Python version: 2.6.2 >>> R version: 2.9.1 >>> rpy2: 2.06 (installed from rpy2-2.0.6.win32-py2.6.msi) >>> >>> >>> >>> Thanks, >>> >>> Wayne >>> >>> >>> >>> >>> >>> ________________________________ >>> Celebrate a decade of Messenger with free winks, emoticons, display pics, >>> and more. Get Them Now >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> rpy-list mailing list >>> rpy-list@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/rpy-list >>> >>> >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> rpy-list mailing list >> rpy-list@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rpy-list > > ------------------------------------------------------------------------------ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list