python - Can I get imshow() like behaviour in a wx.lib.plot.PlotCanvas? -
i'm new wxpython have been matplotlib user time now. developing wxpython app in have simple frame single panel (actually, wx.lib.plot.plotcanvas instance). in panel want show data, in form of binary array (called imarr), one:
array of shape (64,n), , n can vary between 400 , 1200 (i can sort out panel sizing myself).
to in matplotlib use like:
fig=figure(figsize=(12,2)) ax=fig.add_subplot(111) ax.set_ylim(0,63) ax.set_xlim(0,imarr.shape[0]) ax.set_aspect('equal') matplotlib.imshow(imarr)
but i'm lost in wxpython. have been looking wx.lib.plot, apart nice line , marker plotting capabilities, there doesn't seem equivalent imshow (or pcolor).
one (ugly) solution have use matplotlib above create png image , use wx magic display image on panel (please set me straight if won't easy).
i'd prefer within wxpython, portability , general tidiness. advice on how display binary array on wx.lib.plot.plotcanvas (or more generic wx.panel) useful!
why don't combine wxpython , matplotlib together? wx.lib.plot.plotcanvas has limited functionality comparing matplotlib. have @ example in answer , example matplotlib documentation. sorry didn't answer asking think right way go.
Comments
Post a Comment