[IPython-User] Capture of plots

Todd Matthews mtoddmatthews@gmail....
Wed Dec 26 17:01:43 CST 2012


Is it possible to capture the plot output within iPython? As the iPython
notebook example titled "Capturing Output" explains -

%%capture` only captures stdout/err, not displaypub, so you can still
do plots and use the display protocol inside

In consistency with this statement,

%%capture
fig = figure()
plot([1,2,3])
fig.savefig('test')
print "Plot Created"

results in the plot being displayed and the print statement being captured.
But, how do you capture the plot display for the case where hundreds of
plot files are being created that I don't want to appear in iPython. But, I
would like to keep the generation of the plots in the same workflow for
tighter production of supplemental work products.

Is there a way to avoid the plot display in iPython or with matplotlib
itself?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121227/9884f445/attachment.html 


More information about the IPython-User mailing list