Skip to content
Advertisement

How to plot (inline) with rpy2 in Jupyter notebook?

I’m learning to use rpy2 in Jupyter notebook. I’m having troubles with the plotting. When I use this example from the rpy2 docs for interactive work:

JavaScript

Jupyter opens a new window with the plot. The window “title” reads: R Graphics: Device 2 (ACTIVE) (Not Responding). My Jupyter kernel is active. When I try to close the window with the plot, windows claims that python.exe is not responsing and if I force close then the jupyter kernel restarts.

First: How can I make rpy2 plot inline? Second: If inline plotting is not possible, how to get the plot in a window without python.exe becoming unresponsive?

Advertisement

Answer

It seems that this is the answer to your question: https://bitbucket.org/rpy2/rpy2/issues/330/ipython-plotting-wrapper

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement