[IPython-dev] ipython notebook and ggplot2
Thu Dec 20 13:05:34 CST 2012
Another option would be to present the ability for the user to register post completion hooks with rmagic that would run some python code
after every %%R code cell. The default post completion hook would implement the current behavior of calling dev.off(), but others could call ggsave() or whatever.
On Dec 20, 2012, at 10:45 AM, Thomas Kluyver wrote:
> On 20 December 2012 18:29, Robert McGibbon <email@example.com> wrote:
> 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.
> In fact, the notebook just sets up a specific temporary directory for your R code, and then displays the png files saved in there. Maybe we should expose that to the R code as something like _ipy_tmpd, so that you can save arbitrary png files?
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev