assign pre-existing toolbar to new canvas

I made a toolbar in a figure originally tied to a canvas via wx backend
means. I cleared the figure, assigned a new canvas, and want to assign the
same toolbar to it. Recreating the toolbar and setting it in wx caused odd
display transition (it was slow I suppose?).

I've been able to to get this mostly to work by simply using:

self.toolbar.canvas = self.canvas

This works so long as a toolbar button isn't pressed originally upon putting
in a new canvas, in which case the user would have to repress the previously
pressed button to make it work.
Any ideas on what I can do?


View this message in context:
Sent from the matplotlib - users mailing list archive at