Thanks. Let me ask another question. How can I get the
> current mode? I like to recover mode after drawing
> everything in non-interactive mode. From help document,
> interactive() seems not to give current mode.
from matplotlib import interactive, is_interactive
print is_interactive()
False
Sorry that these features aren't documented
By the way, ipython already has all of this built-in. In the pylab
mode you start in interactive mode. But you can "run" a code snippent
using the run command, which turns off interactive mode for the
duration of the run, restoring the original interactive state when the
run finishes.
JDH