Live (real-time) plotting two data sets on the same graph

I've already made a wxpython based solution to plot real-time data on plots
(using matplotlib). Basically there is a timer for redrawing data (that is
appended to by another thread), and when it redraws it does:

timestamp = time.time()

# add to x, y datasets
self.timestamps.append(timestamp)
self.vehicle_speeds.append(self.monitor_data_api.get_vehicle_speed())

# update plot bounds
self.axes_vehicle_speed.set_xbound(lower=(timestamp - 10.0),
upper=timestamp)
self.axes_vehicle_speed.set_ybound(lower=min(self.vehicle_speeds),
upper=max(self.vehicle_speeds))

# add data
self.plot_data_vehicle_speed.set_xdata(np.array(self.timestamps))
self.plot_data_vehicle_speed.set_ydata(np.array(self.vehicle_speeds))

However how do I add another y dataset to the same plot
"self.axes_vehicle_speed" in say blue?

I know about the common methods as outlined in:
http://www.scipy.org/Cookbook/Matplotlib/MultilinePlots

However they will not work for live plotting. Any ideas?

ยทยทยท

--
View this message in context: http://old.nabble.com/Live-(real-time)-plotting-two-data-sets-on-the-same-graph-tp32932476p32932476.html
Sent from the matplotlib - users mailing list archive at Nabble.com.