Hello--

I've been following the sample code given in the wxPython distribution 
to embed a wxPython window in wxGTK.  The following links to the 
wxPython SVN demonstrate this technique:

http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/samples/embedded/embedded_sample.py?revision=47031&view=markup
http://svn.wxwidgets.org/viewvc/wx/wxPython/trunk/samples/embedded/embedded.cpp?revision=52947&view=markup

The main program (embedded.cpp) interacts with an embedded wxPython 
script (embedded_sample.py).  What I would like to do is embed 
matplotlib within a wxPanel of this wxPython script.  The following code 
snippet shows exactly what I would like to do:


# Begin Python code snippet
import matplotlib
matplotlib.interactive( True )
matplotlib.use( 'WXAgg' )

import numpy as num
import wx


class MyPanel(wx.Panel):
         def __init__(self, parent):
             wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER)

             # what do I do down here to be able to embed matplotlib 
within the wxPanel?

# end code snippet


In a similar fashion to the Matlab imagesc() function, I would like to 
embed a matplotlib image which displays a 2D matrix as a colormapped 
image.  How might I be able to do this?

Nicholas


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to