####
## Script to trigger save_figure bug
## with TkAgg backend
####
import pylab as pl
pl.ion();
print 'make a plot'
pl.plot(range(1,10));
print 'call save_figure. Use the GUI, or call it from the commandline.'
print 'Now interact with the dialog-box and click SAVE or CANCEL'
figman = pl.get_current_fig_manager();
figman.toolbar.save_figure();
print 'Make another plot'
pl.plot(range(1,10));
print 'This has popped up a new window with the same figure._num as before.'
print 'Try closing via pl.close("all")';
print 'The first window has been forgotten about'


