[IPython-User] an idea for a magic

John Hunter jdh2358@gmail....
Sat Jul 14 18:47:38 CDT 2012


I've been thinking about toggling inline and non-inline toggle figures.  Eg
suppose I am demo-ing mplot3d and want to pop a figure out of the notebook
for some interaction. It appears this is still not fully baked according to
the issue

https://github.com/ipython/ipython/issues/1927

I had an idea for something simple.  A common use case , for me at least,
is to have a cell that represents a complete figure, eg it doesn't rely on
the cells above except for the plt and np imports.  One could have a
"popout" magic, where you decorate a cell with "%popout gtkagg" or
something like that.  It creates a tempfile with the np and plt imports
then all the code from the cell, then does a shebang python on the
tempfile.  Voila, your figure pops up for interactive navigation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120714/b0dfeceb/attachment-0001.html 


More information about the IPython-User mailing list