Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

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

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

with rpy2.robjects.lib.grdevices.render_to_bytesio(grdevices.png, width=1024, height=896, res=150) as img:
    graphics.barplot(IntVector((1,3,2,5,4)), ylab="Value")
IPython.display.display(IPython.display.Image(data=img.getvalue(), format='png', embed=True))

Tags:

Python

Plot

R

Rpy2

Jupyter

Related

"Add JUnit library" in Eclipes does not have "Junit 5" option Gitkraken stuck at opening repo Turning Firebase Analytics on on Xcode Logging setLevel is being ignored Android : How to write camera intent in android nougat Angular CLI (ng) use single instead of double quotes Convert contour paths to svg paths IE 11 flexbox child width not respecting content (Safari too) Angular 2 how to keep event from triggering digest loop/detection cycle? jQuery .ajax() - add query parameters to POST request? how to access history object in new React Router v4 How do you decrease navbar height in Bootstrap 4?

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy