canvas.Refresh problem with 0.99

I previously used version '0.90.1' and could do something along these lines.

figure.add_axes
... etc
canvas.Refresh()

User makes a new selection and in the code I do:

figure.clear()
figure.add_axes
... etc
canvas.Refresh()

With 0.99 and wxAgg on Windows Vista with wxPython 2.8.10.1 Unicode and Python 2.5.4 this does not work.

The "old" figure remains and the new one is only shown when I resize the frame which contains a wx.Splitter with the right window containing the mpl.figure on a panel.

If I add canvas.draw() then most is shown, except some mpl.text elements (e.g. figure.title) - which again are shown if I resize.

Appreciate any hint on how to solve this.

Werner

Werner F. Bruhin wrote:

I previously used version '0.90.1' and could do something along these lines.

figure.add_axes
... etc
canvas.Refresh()

User makes a new selection and in the code I do:

figure.clear()
figure.add_axes
... etc
canvas.Refresh()

With 0.99 and wxAgg on Windows Vista with wxPython 2.8.10.1 Unicode and Python 2.5.4 this does not work.

The "old" figure remains and the new one is only shown when I resize the frame which contains a wx.Splitter with the right window containing the mpl.figure on a panel.

If I add canvas.draw() then most is shown, except some mpl.text elements (e.g. figure.title) - which again are shown if I resize.

Appreciate any hint on how to solve this.
  

I had to add the canvas.Draw() call, but I had that to early in my code, i.e. the title was only added to the figure after I had called Draw() - 0.90 was forgiven me this stupid mistake.

Sorry for the noise.
Werner