[IPython-User] [notebook] opposite of display(gcf())

Matthias BUSSONNIER bussonniermatthias@gmail....
Wed Dec 19 11:24:58 CST 2012


Le 18 déc. 2012 à 20:15, Michael Aye a écrit :

> On 2012-12-14 16:52:27 +0000, Matthias BUSSONNIER said:
>> 
>> * other backend include qt, osx, … once you choose one you can't get 
>> the other others.
> 
> Ok, but with the display function I could display the existing 'outline' plot.
> So, I take it there is no way to display an existing inline plot 
> temporarily 'outline'?

Yes and No. 

you can look at 
$ IPython notebook --help-all

InlineBackend section.
pasted at the end of this mail.

So if you keep track of the fig object Yes, 
Otherwise No, the only trace of the figure is a base-64 encoded png in the ipynb file.

I suggest you look at the OO way of matplotlib,
You can do really nice things when you know matplotlib a little more intimately. 

-- 
Matthias





InlineBackend options
---------------------
--InlineBackend.close_figures=<CBool>
    Default: True
    Close all figures at the end of each cell.
    When True, ensures that each cell starts with no active figures, but it also
    means that one must keep track of references in order to edit or redraw
    figures in subsequent cells. This mode is ideal for the notebook, where
    residual plots from other cells might be surprising.
    When False, one must call figure() to create new figures. This means that
    gcf() and getfigs() can reference figures created in other cells, and the
    active figure can continue to be edited with pylab/pyplot methods that
    reference the current active figure. This mode facilitates iterative editing
    of figures, and behaves most consistently with other matplotlib backends,
    but figure barriers between cells must be explicit.
--InlineBackend.figure_format=<CaselessStrEnum>
    Default: 'png'
    Choices: ['svg', 'png']
    The image format for figures with the inline backend.
--InlineBackend.rc=<Dict>
    Default: {'font.size': 10, 'figure.figsize': (6.0, 4.0), 'figure.facec...
    Subset of matplotlib rcParams that should be different for the inline
    backend.



> 
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user



More information about the IPython-User mailing list