Hello,

>How can I do this using mpl and wx backend? Do you recommend using
>threading or forking plots as separate processes ?

None of the above is necessary. 

Add this to imports:
import matplotlib
matplotlib.use('WXAgg')

import matplotlib.cm as cm
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
from matplotlib.figure import Figure
from pylab import *

Just instanciate some wx.panel with inside

self.sizer = wx.BoxSizer(wx.VERTICAL)
fig = Figure()
self.figure = FigureCanvasWxAgg(self.widget, -1, fig)
self.sizer.Add(self.figure, 1, wx.EXPAND)

x1 = array(var1['data'])
y1 = array(var1['data'])
        
axes = fig.add_subplot(111)#211)
axes.yaxis.tick_left()
axes.plot(x1,y1,alpha=1)
           

And should be OK.
Personnaly I use wx.aui to manage multpile wx.panel inside an App, but it
depends what you want to do with your app.

Laurent


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to