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:
from rpy2.interactive import process_revents
from rpy2.robjects.packages import importr
from rpy2.robjects.vectors import IntVector
process_revents.start()
graphics = importr("graphics")
graphics.barplot(IntVector((1,3,2,5,4)), ylab="Value")
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?