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

Jose Guzman sjm.guzman@gmail....
Mon Aug 26 14:31:19 CDT 2013


Thanks Martijn,

that would do the job!

Best

Jose

On 26/08/13 16:21, Martijn Vermaat wrote:
> 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
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>


-- 
Jose Guzman
http://www.ist.ac.at/~jguzman/


More information about the IPython-User mailing list