Hi,
    In matplotlib, is there a way to check whether a window related to a
figure has been closed by user?

x=[1,2,3]
fig = plt.figure()
fig.show()
plt.plot(x,x)
plt.draw()

later in the code, I want to make draw some other line, possibly on the
same figure. I can switch to the preivious figure by

plt.figure(fig.number)

but it seems that even if fig has been closed by the user, this will still
work because the information stored in fig is still accessible. Then, this
fig.number would actually point some other picture.

So, is there any state information in fig that would tell whether the
window of fig has been closed by user?


Thanks

Qian
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to