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-%28real-time%29-plotting-two-data-sets-on-the-same-graph-tp32932476p32932476.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users