4
votes

I am using IPython 0.12.1 notebook to connect from a Windows machine to a Linux server where the IPython kernel runs. Since the Linux machine doesn't have an X-Server installed, I am using the following configuration:

IPKernelApp.pylab = 'inline'

which displays the figures inline.

IPython closes the figures once they are drawn in the notebook. So how can I edit the figure which was just drawn? Like adding a title. The drawing process takes a while for my case and I would appreciate a means to play with the figure before saving it without a need to redraw it.

I tried saving a handle to the figure and working with that, but I was not successful.

2
To the best of my knowledge, at the moment, it isn't possible to edit figures that are drawn with the inline interface. You need to redraw. - cge
For now, I let the figures stay open and close them manually. I would rather have the ability to open figures in a popup and close them by closing the popup. - Choghazanbil

2 Answers

5
votes

I ended up setting the following in the ipython notebook configuration file:

c.InlineBackend.close_figures = False

The figures are editable but I have to close them myself instead which I do by close('all')

4
votes

You can enter this magic configuration:

%config InlineBackend.close_figures = False