Reputation: 21459
Using SVG in a Jupyter notebook with R kernel mangles the text. See here and here. The workaround is to use PNG. It's a bit blurry. In Python, you can ask the PNG renderer to use more dots per inch with
InlineBackend.figure_format = 'retina'
See for example trick 15 here.
How can I get higher resolution plots using the R kernel? SVG workaround? PNG renderer settings?
Edit: I'm using ggplot in R.
Edit 2: I found repr.plot
defaults here, including res, which looks to be dots per inch (dpi). However, when I raise the res
from 120 to 300, the plot gets bigger, despite me setting height and width.
Edit 3: I filed this issue. There are suggestions for how to fix it in the code, but no workarounds.
Upvotes: 16
Views: 2831
Reputation: 11
I have recently discover that packages : plotly can work well on creating ggplot images
try the plot_ly() function to save png pics
hope this can help!
Upvotes: 1