Quoting John Hunter: > Alternatively you can connect to the figure dpi_changed event -- there is > an example in Axes.cla
Regarding that example, each call to Axes.cla connects a new dpi_changed callback, but, as far as I can tell, the callback is never disconnected. Thus, each cla call augments the dict of dpi_changed figure callbacks: fig = figure() ax = fig.add_subplot(1, 1, 1) print len(fig.callbacks.callbacks['dpi_changed']) # only 1 for n in range(7): ax.cla() print len(fig.callbacks.callbacks['dpi_changed']) # now 8 Should cla store the connection id and, if there is a stored id from a prior call, disconnect the previous callback before connecting the new one? Stan ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel