[IPython-User] How to reuse a plot in the notebook

Martijn Vermaat martijn@vermaat.n...
Mon Aug 26 09:21:13 CDT 2013


Hi Jose,

You can use

  %config InlineBackend.close_figures=False

to toggle between closing figures and keeping them open.

cheers,
Martijn


2013/8/26 Jose Guzman <sjm.guzman@gmail.com>:
> Is there any way to reuse plots in the notebook?
>
> For example if I generate a plot in a cell like this:
>
>  >>> plt.plot(x,y)
>
> and I want to reuse this plot in a new cell later, or add a new plot on
> top of it,  I generally do:
>
>  >>> plt.plot(x,y) + plt.plot(x,y2)
>
> but it seems to redundant to me. Is there any better way, something like
>
>  >>> myplot1 = plt.plot(x,y)
>
> Thanks in advance
>
> Jose
> --
> Jose Guzman
> http://www.ist.ac.at/~jguzman/
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user


More information about the IPython-User mailing list