<div dir="ltr"><div><div>Is it possible to capture the plot output within iPython? As the iPython notebook example titled "Capturing Output" explains -<br><pre>%%capture` only captures stdout/err, not displaypub, so you can still do plots and use the display protocol inside</pre>
In consistency with this statement,<br><br></div><div>%%capture<br></div><div>fig = figure()<br>plot([1,2,3])<br>fig.savefig('test')<br></div><div>print "Plot Created"<br></div><div><br></div><div>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.<br>
</div><br></div>Is there a way to avoid the plot display in iPython or with matplotlib itself?</div>