I use the followng function for my application:
def OnSaveAs(self, event):
dlg = wx.FileDialog(self, ‘Choose a Filename’, os.getcwd(), ‘’, ‘.png’, wx.SAVE | wx.OVERWRITE_PROMPT)
if dlg.ShowModal() == wx.ID_OK:
savename = dlg.GetPath()
This seems to work, but when I open the resulting PNG, only the figure is saved without the graph … But when I use the save button from the figure itself, the result is fine, the figure is save with the graph. So I can just removed that function, but I am curious, why it does not work as expected. Any ideas, what my mistake is?