Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > a44f8c7e78ee9c5838c1fb080c9e7630 > files > 1839

python-matplotlib-doc-1.1.1-1mdv2010.1.noarch.rpm

import matplotlib.pyplot as plt

def handle_close(evt):
    print 'Closed Figure!'

fig = plt.figure()
fig.canvas.mpl_connect('close_event', handle_close)

plt.text(0.35, 0.5, 'Close Me!', dict(size=30))
plt.show()