[IPython-User] Notebook: replot from axis object in subsequent cells
Sat Sep 15 02:17:51 CDT 2012
I'm working on converting some tutorials over from MATLAB into the
Notebook. In these tutorials, frequently there will be some code to
generate a plot, commentary on the plot, and then several small changes and
replots (e.g. adding things in steps, changing the view in 3D plots, etc.)
Is there a way (using the matplotlib object-oriented interface) to replot
an axis object in a subsequent cell, thus avoiding rewriting all of the
common plotting code? In other words something like:
In : ax = subplot(111); ax.plot(foo);
In : replot(ax); ax.plot(bar)
Obviously in this toy example it doesn't save much, but for more
complicated plots it could make things much more clean.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User