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:
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
matplotlib.interactive( True )
matplotlib.use( 'WXAgg' )
import numpy as num
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?