It's hard to say from the code snippet, but I would track down whether self.page_graph.figure is the figure that you think it is. It could be a Figure object without any axes on it.

Cheers,
Mike

On 07/08/2011 03:55 AM, Sebastian Rhode wrote:
Hi,

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()

         self.page_graph.figure.savefig(savename)

     dlg.Destroy()


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?

Cheers,

Sebi


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2


_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to