[IPython-dev] ipython notebook and ggplot2
Thu Dec 20 12:29:57 CST 2012
The trick is that in the rmagic code, it calls dev.off() and does some handling for base graphics after every R code cell is executed.
When I use ggplot2 in the terminal app (not notebook), what I do is call
ggsave('temp.png'); system('open temp.png')
At the end of my plotting session. This pops up the plot in my image editor.
For the notebook, I think it's a little more complicated because you have to send the png to the front end through the display pub.
Sent from my iPhone
On Dec 20, 2012, at 5:13 AM, Javier Martínez-López <firstname.lastname@example.org> wrote:
> Dear all,
> I am sorry if this is a particular question but I am working with R using the ipython notebook and I cannot plot grahps using the ggplot2 library. I do not know why, when I run the code nothing comes up! The same code works fine using the usual R interface and all other non ggplot2 graphs work fine under the nb. Of course, I previously loaded the ggplot2 library before plotting. Is there a trick, does anyone knows anything about this?
> Thank you very much for your help,
> IPython-dev mailing list
More information about the IPython-dev