コード例 #1
0
ファイル: dialog.py プロジェクト: soltesz-lab/spykeutils
    def synchronize_axis(self, axis, plots=None):
        if plots is None:
            if axis in self.axis_syncplots:
                plots = self.axis_syncplots[axis]
            else:
                plots = self.plots.keys()
        if len(plots) < 1:
            return

        PlotManager.synchronize_axis(self, axis, plots)

        # Find interval that needs to be shown in order to include all
        # currently shown parts in the synchronized plots
        plot_objects = [self.plots[p] for p in plots]
        lb = min((p.axisScaleDiv(axis).lowerBound() for p in plot_objects))
        ub = max((p.axisScaleDiv(axis).upperBound() for p in plot_objects))
        for p in plot_objects:
            p.setAxisScale(axis, lb, ub)
            p.replot()
コード例 #2
0
ファイル: dialog.py プロジェクト: rproepp/spykeutils
    def synchronize_axis(self, axis, plots=None):
        if plots is None:
            if axis in self.axis_syncplots:
                plots = self.axis_syncplots[axis]
            else:
                plots = self.plots.keys()
        if len(plots) < 1:
            return

        PlotManager.synchronize_axis(self, axis, plots)

        # Find interval that needs to be shown in order to include all
        # currently shown parts in the synchronized plots
        plot_objects = [self.plots[p] for p in plots]
        lb = min((p.axisScaleDiv(axis).lowerBound() for p in plot_objects))
        ub = max((p.axisScaleDiv(axis).upperBound() for p in plot_objects))
        for p in plot_objects:
            p.setAxisScale(axis, lb, ub)
            p.replot()
コード例 #3
0
ファイル: syncplot.py プロジェクト: HaMF/guiqwt
 def create_plot(self, options):
     manager = PlotManager(None)
     self.plotwidget = CurveWidget(self, manager=manager, **options)
     manager.set_main(self.plotwidget)
     plot1 = CurvePlot(title="TL")
     plot2 = CurvePlot(title="TR")
     plot3 = CurvePlot(title="BL")
     plot4 = CurvePlot(title="BR")
     self.plotwidget.add_plot(plot1, 0, 0, "1")
     self.plotwidget.add_plot(plot2, 0, 1, "2")
     self.plotwidget.add_plot(plot3, 1, 0, "3")
     self.plotwidget.add_plot(plot4, 1, 1, "4")
     self.plotwidget.finalize()
     manager.synchronize_axis(BasePlot.X_BOTTOM, ["1", "3"])
     manager.synchronize_axis(BasePlot.X_BOTTOM, ["2", "4"])
     manager.synchronize_axis(BasePlot.Y_LEFT,   ["1", "2"])
     manager.synchronize_axis(BasePlot.Y_LEFT,   ["3", "4"])
     
     self.layout.addWidget(self.plotwidget, 0, 0)
コード例 #4
0
    def create_plot(self, options):
        manager = PlotManager(None)
        self.plotwidget = CurveWidget(self, manager=manager, **options)
        manager.set_main(self.plotwidget)
        plot1 = CurvePlot(title="TL")
        plot2 = CurvePlot(title="TR")
        plot3 = CurvePlot(title="BL")
        plot4 = CurvePlot(title="BR")
        self.plotwidget.add_plot(plot1, 0, 0, "1")
        self.plotwidget.add_plot(plot2, 0, 1, "2")
        self.plotwidget.add_plot(plot3, 1, 0, "3")
        self.plotwidget.add_plot(plot4, 1, 1, "4")
        self.plotwidget.finalize()
        manager.synchronize_axis(BasePlot.X_BOTTOM, ["1", "3"])
        manager.synchronize_axis(BasePlot.X_BOTTOM, ["2", "4"])
        manager.synchronize_axis(BasePlot.Y_LEFT, ["1", "2"])
        manager.synchronize_axis(BasePlot.Y_LEFT, ["3", "4"])

        self.layout.addWidget(self.plotwidget, 0, 0)
コード例 #5
0
ファイル: dialogs.py プロジェクト: neurodebian/spykeutils
 def synchronize_axis(self, axis, plots = None):
     if plots is None:
         plots = self.plots.keys()
     PlotManager.synchronize_axis(self, axis, plots)
コード例 #6
0
class RealtimeDemo(QWidget):
    def __init__(self):
        super(RealtimeDemo, self).__init__()
        self.setWindowTitle(u"Realtime Demo")

        self.data = {u"t":array("d")}
        for name in sum(PLOT_DEFINE, []):
            self.data[name] = array("d")

        self.curves = {}
        self.t = 0
        vbox = QVBoxLayout()
        vbox.addWidget(self.setup_toolbar())
        self.manager = PlotManager(self)
        self.plots = []
        for i, define in enumerate(PLOT_DEFINE):
            plot = CurvePlot()
            plot.axisScaleDraw(CurvePlot.Y_LEFT).setMinimumExtent(60)
            self.manager.add_plot(plot)
            self.plots.append(plot)
            plot.plot_id = id(plot)
            for j, curve_name in enumerate(define):
                curve = self.curves[curve_name] = make.curve([0], [0], color=COLORS[j], title=curve_name)
                plot.add_item(curve)
            plot.add_item(make.legend("BL"))
            vbox.addWidget(plot)
        self.manager.register_standard_tools()
        self.manager.get_default_tool().activate()
        self.manager.synchronize_axis(CurvePlot.X_BOTTOM, self.manager.plots.keys())
        self.setLayout(vbox)
        self.startTimer(100)

    def setup_toolbar(self):
        toolbar = QToolBar()
        self.auto_yrange_checkbox = QCheckBox(u"Y-axis auto-adjust")
        self.auto_xrange_checkbox = QCheckBox(u"X-axis auto-adjust")
        self.xrange_box = QSpinBox()
        self.xrange_box.setMinimum(5)
        self.xrange_box.setMaximum(50)
        self.xrange_box.setValue(10)
        self.auto_xrange_checkbox.setChecked(True)        
        self.auto_yrange_checkbox.setChecked(True)
        toolbar.addWidget(self.auto_yrange_checkbox)
        toolbar.addWidget(self.auto_xrange_checkbox)        
        toolbar.addWidget(self.xrange_box)
        return toolbar

    def timerEvent(self, event):
        for i in range(100):
            t = self.t
            self.data[u"t"].append(t)
            self.data[u"sin1f"].append(sin(t))

            self.data[u"sin3f"].append(sin(3*t)/6)

            self.t += DT

        if self.auto_xrange_checkbox.isChecked():
            xmax = self.data["t"][-1]
            xmin = max(xmax - self.xrange_box.value(), 0)
        else:
            xmin, xmax = self.plots[0].get_axis_limits('bottom')

        for key, curve in self.curves.items():
            xdata = self.data["t"]
            ydata = self.data[key]
            x, y = get_peak_data(xdata, ydata, xmin, xmax, 600, 1/DT)
            curve.set_data(x, y)

        for plot in self.plots:
            if self.auto_yrange_checkbox.isChecked() and self.auto_xrange_checkbox.isChecked():
                plot.do_autoscale()
            elif self.auto_xrange_checkbox.isChecked():
                plot.set_axis_limits("bottom", xmin, xmax)
                plot.replot()
            else:
                plot.replot()
コード例 #7
0
ファイル: PlottingHelper.py プロジェクト: Toilet22/BPMonitor
class PlottingHelper(object):
	'''This is the class implementing the plotting work.'''
	def __init__(self, parent, signal_names, sample_rate):
		'''Do the initialization work.
		A PlottingHelper object helps plotting a group of signals all of which 
		has the same number of points to plot at one time.
		signal_names: 
			a dictionary {'list_name':['list of signal names']}
		sample_rate:
			the sample_rate of the signals
		'''

		self.sample_rate = sample_rate
		self.signal_names = signal_names
		self.curve_items = {}
		self.curve_plots = {}
		self.plot_manager = PlotManager(parent)

		for list_name, sig_name_list in self.signal_names.items():
			# One CurvePlot object for every sig_name_list
			curve_plot = CurvePlot()
			curve_plot.axisScaleDraw(CurvePlot.Y_LEFT).setMinimumExtent(10)
			self.curve_plots[list_name] = curve_plot
			curve_plot.plot_id = id(curve_plot)
			for i, sig_name in enumerate(sig_name_list):
				# One CurveItem object for every signal_name 
				print sig_name, colors[i]
				self.curve_items[sig_name] = make.curve([0], [0], \
					color=colors[i], title=sig_name)
				curve_plot.add_item(self.curve_items[sig_name])

			# add the curve_plot object to plot_manager
			self.plot_manager.add_plot(curve_plot) 

		# register and activate the tools 
		self.plot_manager.register_standard_tools()
		self.plot_manager.get_default_tool().activate()
		self.plot_manager.synchronize_axis(CurvePlot.X_BOTTOM, \
									self.plot_manager.plots.keys())

	def update_curves(self, time, signals, interval_in_second):	
		'''update the curves everytime the signals change
		time:
			the time sequence, which is also the x_axis data
		signal:
			a dictionary of signals to plot, the keys of which is recorded
			in self.signal_names.
			and in fact these are the y_axis data
		'''
		xmax = time[-1]
		xmin = max(xmax - interval_in_second, 0)
		xdata = time
		for list_name, sig_name_list in self.signal_names.items():
			# 
			for i, sig_name in enumerate(sig_name_list):
				# 
				ydata = signals[sig_name]
				idxmn = int(xmin*self.sample_rate)
				idxmx = int(xmax*self.sample_rate)
				self.curve_items[sig_name].set_data(xdata[idxmn:idxmx], \
													ydata[idxmn:idxmx])

			self.curve_plots[list_name].do_autoscale()
コード例 #8
0
class RealtimeDemo(QWidget):
    def __init__(self):
        super(RealtimeDemo, self).__init__()
        self.setWindowTitle(u"Realtime Demo")

        self.data = {u"t":array("d")}
        for name in sum(PLOT_DEFINE, []):
            self.data[name] = array("d")

        self.curves = {}
        self.t = 0
        vbox = QVBoxLayout()
        vbox.addWidget(self.setup_toolbar())
        self.manager = PlotManager(self)
        self.plots = []
        for i, define in enumerate(PLOT_DEFINE):
            plot = CurvePlot()
            plot.axisScaleDraw(CurvePlot.Y_LEFT).setMinimumExtent(60)
            self.manager.add_plot(plot)
            self.plots.append(plot)
            plot.plot_id = id(plot)
            for j, curve_name in enumerate(define):
                curve = self.curves[curve_name] = make.curve([0], [0], color=COLORS[j], title=curve_name)
                plot.add_item(curve)
            plot.add_item(make.legend("BL"))
            vbox.addWidget(plot)
        self.manager.register_standard_tools()
        self.manager.get_default_tool().activate()
        self.manager.synchronize_axis(CurvePlot.X_BOTTOM, self.manager.plots.keys())
        self.setLayout(vbox)
        self.startTimer(100)

    def setup_toolbar(self):
        toolbar = QToolBar()
        self.auto_yrange_checkbox = QCheckBox(u"Y轴自动调节")
        self.auto_xrange_checkbox = QCheckBox(u"X轴自动调节")
        self.xrange_box = QSpinBox()
        self.xrange_box.setMinimum(1)
        self.xrange_box.setMaximum(50)
        self.xrange_box.setValue(1)
        self.auto_xrange_checkbox.setChecked(True)        
        self.auto_yrange_checkbox.setChecked(True)
        toolbar.addWidget(self.auto_yrange_checkbox)
        toolbar.addWidget(self.auto_xrange_checkbox)        
        toolbar.addWidget(self.xrange_box)
        return toolbar

    def timerEvent(self, event):
        global bin_ori
        # writecache = []
        drawcache = []
        MAXRANGE = 65535
        AMPL = 6
        for i in range(n_channel):
            # writecache.append([])
            drawcache.append([])
        for i in range(collecttime):
            n = ser.inWaiting()
            # print(n)
            ori = ser.read(n)
            bin_ori += str(binascii.b2a_hex(ori))[2:-1]

        ffff_list = bin_ori.split('fffffffe')
        bin_ori = ffff_list[-1]
        wrong_no = 0
        # print(len(ffff_list))
        for i in range(1, len(ffff_list)):
            if len(ffff_list[i]) != 4 * n_channel:
                # print(i)
                # print('receive wrong')
                wrong_no += 1
                # print(ffff_list[i])
                continue

            for j in range(n_channel):
                temp = int(ffff_list[i][4 * j:4 * (j + 1)], 16)
                drawcache[j].append((temp))# - MAXRANGE / 2) / (MAXRANGE / 2) * AMPL)
                # writecache[j].append(str(temp))

        # print(wrong_no)
        # print(wrong_no / len(ffff_list))
        for i in xrange(len(drawcache[0])):
            t = self.t
            self.data[u"t"].append(t)
            # for j in xrange(n_channel):
            #     self.data[u"signal_"+str(j)].append(drawcache[j][i])
            # self.data[u"signal_0"].append(drawcache[0][i])
            self.data[u"signal_1"].append(drawcache[1][i])
            # self.data[u"signal_2"].append(drawcache[2][i])
            # self.data[u"signal_3"].append(drawcache[3][i])
            self.data[u"signal_4"].append(drawcache[4][i])
            # self.data[u"signal_5"].append(drawcache[5][i])
            # self.data[u"signal_6"].append(drawcache[6][i])
            self.data[u"signal_7"].append(drawcache[7][i])
            # self.data[u"signal_8"].append(drawcache[8][i])
            # self.data[u"signal_9"].append(drawcache[9][i])
            self.t += DT

        # for i in xrange(100):
        #     t = self.t
        #     self.data[u"t"].append(t)
        #     self.data[u"sin1f"].append(sin(t))
        #     self.data[u"cos1f"].append(cos(t))
        #     self.data[u"sin3f"].append(sin(3*t)/6)
        #     self.data[u"cos3f"].append(cos(3*t)/6)
        #     self.data[u"sin合成"].append(sin(t)+sin(3*t)/6)
        #     self.data[u"cos合成"].append(cos(t)+cos(3*t)/6)
        #     self.t += DT

        if self.auto_xrange_checkbox.isChecked():
            xmax = self.data["t"][-1]
            xmin = max(xmax - self.xrange_box.value(), 0)
        else:
            xmin, xmax = self.plots[0].get_axis_limits('bottom')

        for key, curve in self.curves.iteritems():
            xdata = self.data["t"]
            ydata = self.data[key]
            x, y = get_peak_data(xdata, ydata, xmin, xmax, 600, 1/DT)
            curve.set_data(x, y)

        for plot in self.plots:
            if self.auto_yrange_checkbox.isChecked() and self.auto_xrange_checkbox.isChecked():
                plot.do_autoscale()
            elif self.auto_xrange_checkbox.isChecked():
                plot.set_axis_limits("bottom", xmin, xmax)
                plot.replot()
            else:
                plot.replot()
コード例 #9
0
ファイル: qtgwtDemo.py プロジェクト: Liung/QAeroData
class RealtimeDemo(QWidget): 
    def __init__(self): 
        super(RealtimeDemo, self).__init__() 
        self.setWindowTitle(u"Realtime Demo") 
  
        self.data = {u"t": array("d")}
        for name in sum(PLOT_DEFINE, []): 
            self.data[name] = array("d") 
  
        self.curves = {} 
        self.t = 0 
        vbox = QVBoxLayout() 
        vbox.addWidget(self.setup_toolbar()) 
        self.manager = PlotManager(self) 
        self.plots = [] 
        for i, define in enumerate(PLOT_DEFINE): 
            plot = CurvePlot() 
            plot.axisScaleDraw(CurvePlot.Y_LEFT).setMinimumExtent(60) 
            self.manager.add_plot(plot) 
            self.plots.append(plot) 
            plot.plot_id = id(plot) 
            for j, curve_name in enumerate(define): 
                curve = self.curves[curve_name] = make.curve([0], [0], color=COLORS[j], title=curve_name) 
                plot.add_item(curve) 
            plot.add_item(make.legend("BL")) 
            vbox.addWidget(plot) 
        self.manager.register_standard_tools() 
        self.manager.get_default_tool().activate() 
        self.manager.synchronize_axis(CurvePlot.X_BOTTOM, self.manager.plots.keys()) 
        self.setLayout(vbox) 
        self.startTimer(100) 
  
    def setup_toolbar(self): 
        toolbar = QToolBar() 
        self.auto_yrange_checkbox = QCheckBox(u"Y轴自动调节") 
        self.auto_xrange_checkbox = QCheckBox(u"X轴自动调节") 
        self.xrange_box = QSpinBox() 
        self.xrange_box.setMinimum(5) 
        self.xrange_box.setMaximum(50) 
        self.xrange_box.setValue(10) 
        self.auto_xrange_checkbox.setChecked(True) 
        self.auto_yrange_checkbox.setChecked(True) 
        toolbar.addWidget(self.auto_yrange_checkbox) 
        toolbar.addWidget(self.auto_xrange_checkbox) 
        toolbar.addWidget(self.xrange_box) 
        return toolbar 
  
    def timerEvent(self, event): 
        for i in xrange(100): 
            t = self.t 
            self.data[u"t"].append(t) 
            self.data[u"sin1f"].append(sin(t)) 
            self.data[u"cos1f"].append(cos(t)) 
            self.data[u"sin3f"].append(sin(3*t)/6) 
            self.data[u"cos3f"].append(cos(3*t)/6) 
            self.data[u"sin合成"].append(sin(t)+sin(3*t)/6) 
            self.data[u"cos合成"].append(cos(t)+cos(3*t)/6) 
            self.t += DT 
  
        if self.auto_xrange_checkbox.isChecked(): 
            xmax = self.data["t"][-1] 
            xmin = max(xmax - self.xrange_box.value(), 0) 
        else: 
            xmin, xmax = self.plots[0].get_axis_limits('bottom') 
  
        for key, curve in self.curves.iteritems(): 
            xdata = self.data["t"] 
            ydata = self.data[key] 
            x, y = get_peak_data(xdata, ydata, xmin, xmax, 600, 1/DT) 
            curve.set_data(x, y) 
  
        for plot in self.plots: 
            if self.auto_yrange_checkbox.isChecked() and self.auto_xrange_checkbox.isChecked(): 
                plot.do_autoscale() 
            elif self.auto_xrange_checkbox.isChecked(): 
                plot.set_axis_limits("bottom", xmin, xmax) 
                plot.replot() 
            else: 
                plot.replot() 
コード例 #10
0
ファイル: 实时plot4.py プロジェクト: Nonikka/Quadcopter
class SyncXAxis(QtGui.QWidget):
    
    def __init__(self):
        super(SyncXAxis, self).__init__()
        
        self.data = {u"t":array("d")} 
        for name in sum(PLOT_DEFINE, []): 
            self.data[name] = array("d") 
        
        self.i = 0
        self.x = []
        self.curves = {} 
        self.t = 0
        self.sint = []
        self.get_Roll = []
        self.get_Pitch = []
        self.get_Yaw = []
        self.get_Angle1 = []
        self.get_Angle2 =[]
        self.get_Angle3 = []
        vbox = QtGui.QGridLayout()
        #工具栏
        vbox.addLayout(self.setup_toolbar(),0,0) 
        self.manager = PlotManager(self)
        self.plots = []
        #生成竖直排列图形窗口
        for i, define in enumerate(PLOT_DEFINE): 
            plot = CurvePlot() 
            plot.axisScaleDraw(CurvePlot.Y_LEFT).setMinimumExtent(60) 
            self.manager.add_plot(plot) 
            self.plots.append(plot) 
            plot.plot_id = id(plot) 
            for j, curve_name in enumerate(define): 
                curve = self.curves[curve_name] = make.curve([0], [0], color=COLORS[j], title=curve_name) 
                plot.add_item(curve) 
            plot.add_item(make.legend("BL")) 
            #vbox.addWidget(plot)
        vbox.addWidget(self.plots[0],1,0)
        vbox.addWidget(self.plots[1],1,1)
        vbox.addWidget(self.plots[2],2,0)
        vbox.addWidget(self.plots[3],2,1)
        
        self.manager.register_standard_tools()
        self.manager.get_default_tool().activate()
        self.manager.synchronize_axis(CurvePlot.X_BOTTOM, self.manager.plots.keys()) 
        self.setLayout(vbox)
        
        self.startTimer(20) 
        
    def setup_toolbar(self): 
        toolbar = QtGui.QGridLayout() 
        self.auto_xrange_checkbox = QtGui.QCheckBox(u"X轴自动调节") 
        self.xrange_box = QtGui.QSpinBox() 
        self.xrange_box.setMinimum(5) 
        self.xrange_box.setMaximum(100) 
        self.xrange_box.setValue(50) 
        self.auto_xrange_checkbox.setChecked(True) 
        
        self.Roll_label = QtGui.QLabel("PID KP:")
        self.lineEdit1 = QtGui.QLineEdit()
        self.lineEdit1.setText("1")
        self.lineEdit1.returnPressed.connect(self.PID_Roll)
        
        self.Roll_label.setBuddy(self.lineEdit1)
        self.Pitch_label = QtGui.QLabel("PID KI:")
        self.lineEdit2 = QtGui.QLineEdit()
        self.Pitch_label.setBuddy(self.lineEdit2)
        self.lineEdit2.setText("1")
        self.lineEdit2.returnPressed.connect(self.PID_Pitch)
        
        self.Yaw_label = QtGui.QLabel("PID KD:")
        self.lineEdit3 = QtGui.QLineEdit()
        self.Yaw_label.setBuddy(self.lineEdit3)
        self.lineEdit3.setText("1")
        self.lineEdit3.returnPressed.connect(self.PID_Yaw)
        
        toolbar.addWidget(self.auto_xrange_checkbox,0,0) 
        toolbar.addWidget(self.xrange_box,0,1) 
        toolbar.addWidget(self.Roll_label,1,0) 
        toolbar.addWidget(self.lineEdit1,1,1) 
        toolbar.addWidget(self.Pitch_label,2,0) 
        toolbar.addWidget(self.lineEdit2,2,1) 
        toolbar.addWidget(self.Yaw_label,3,0) 
        toolbar.addWidget(self.lineEdit3,3,1) 
        return toolbar 
        
    
    def PID_Roll(self):
        global RPY_Array
        try:
            #print str(int(self.lineEdit1.text()))
            RPY_Array[0] = int(self.lineEdit1.text())
        except:
            pass
            
    def PID_Pitch(self):
        global RPY_Array
        try:
            #print str(self.lineEdit1.text())
            RPY_Array[1] = int(self.lineEdit2.text())
        except:
            pass
            
    def PID_Yaw(self):
        global RPY_Array
        try:
            #print str(self.lineEdit1.text())
            RPY_Array[2] = int(self.lineEdit3.text())
        except:
            pass
        
    def timerEvent(self, event): 
        global RPY_Array,Roll,Pitch,Yaw,Angle1,Angle2,Angle3
        global xSlider,ySlider,zSlider
        self.x.append(self.t)
        self.t += DT 
        self.sint.append(np.sin(self.t))
        self.get_Roll.append(Roll)
        self.get_Pitch.append(Pitch)
        self.get_Yaw.append(Yaw)
        self.get_Angle1.append(Angle1)
        self.get_Angle2.append(Angle2)
        self.get_Angle3.append(Angle3)
        xSlider.setValue(Angle1 * 16)#初始值
        ySlider.setValue(Angle3 * 16)
        zSlider.setValue(Angle2 * 16)
        #x轴的移动
        if self.auto_xrange_checkbox.isChecked(): 
            xmax = self.x[-1] 
            xmin = self.xrange_box.value()
            if len(self.x) > xmin:
                
                self.x = self.x[-xmin:-1]
                self.get_Roll = self.get_Roll[-xmin:-1]
                self.get_Pitch = self.get_Pitch[-xmin:-1]
                self.get_Yaw = self.get_Yaw[-xmin:-1]
                self.get_Angle1 = self.get_Angle1[-xmin:-1]
                self.get_Angle2 = self.get_Angle2[-xmin:-1]
                self.get_Angle3 = self.get_Angle3[-xmin:-1]
        else :
            pass
        self.y_array = [[],[],[],[],[],[]]
        #3 最后一个
        #0 三
        #2 二
        self.y_array[2] = self.get_Roll
        self.y_array[0] = self.get_Pitch
        self.y_array[3] = self.get_Yaw
        self.y_array[1] = self.get_Angle1
        self.y_array[4] = self.get_Angle2
        self.y_array[5] = self.get_Angle3
        #print "\n",
        #print Roll,Pitch,Yaw,Angle1,Angle2,Angle3
        #发送PID参数
        global RPY_Array
        #serial_send(str("%04d" %RPY_Array[0]) + str("%04d" %RPY_Array[1]) + str("%04d" %RPY_Array[2]) + "111111")
        
        #更新数据 刷新图像
        self.i = 0
        for key, curve in self.curves.iteritems(): 
            #self.sint = self.sint + 1
            #self.sint = [x + 0.1 for x in self.sint]
            #print type(self.x),type(self.t)
            try:
                curve.set_data(self.x,self.y_array[self.i])
            except:
                pass
            #print self.i
            #print key
            self.i += 1
            
            
        for plot in self.plots: 
            if self.auto_xrange_checkbox.isChecked(): 
                plot.do_autoscale() 
            elif self.auto_xrange_checkbox.isChecked(): 
                plot.set_axis_limits("bottom", xmin, xmax) 
                plot.replot() 
            else: 
                plot.replot()