From 8a4ce06cbfca64a75f963bd636bf469f640ab838 2011-04-11 07:59:08 From: Fernando Perez Date: 2011-04-11 07:59:08 Subject: [PATCH] Close all mpl figures after flushing them to the console. This provides for a more natural workflow when using inline figures. --- diff --git a/IPython/zmq/pylab/backend_inline.py b/IPython/zmq/pylab/backend_inline.py index 3037e9d..5eb9091 100644 --- a/IPython/zmq/pylab/backend_inline.py +++ b/IPython/zmq/pylab/backend_inline.py @@ -21,7 +21,7 @@ from IPython.lib.pylabtools import figure_to_svg # Functions #----------------------------------------------------------------------------- -def show(close=False): +def show(close=True): """Show all figures as SVG payloads sent to the IPython clients. Parameters @@ -57,8 +57,6 @@ def flush_svg(): prior code execution, there had been any calls to draw_if_interactive. """ if show._draw_called: - # Show is called with the default close=False here, otherwise, the - # Figure will be closed and not available for future plotting. show() show._draw_called = False