A_scope.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:pslab-desktop-apps 作者: fossasia 项目源码 文件源码
def plot_liss(self):
        lissx = self.Liss_x.currentText()
        lissy = self.Liss_y.currentText()
        self.liss_x = self.Liss_x.currentIndex()
        self.liss_y = self.Liss_y.currentIndex()
        if not (self.channel_states[self.liss_x] and self.channel_states[self.liss_y]):
            QtGui.QMessageBox.about(self, 'Error : Insufficient Data',  'Please enable the selected channels in the oscilloscope')
            return

        self.liss_win = pg.GraphicsWindow(title="Basic plotting examples")
        self.liss_win.setWindowTitle('pyqtgraph example: Plotting')
        self.p1 = self.liss_win.addPlot(title="Lissajous: x : %s vs y : %s"%(lissx,lissy),x=self.I.achans[self.liss_x].get_yaxis(),y=self.I.achans[self.liss_y].get_yaxis())
        self.p1.setLabel('left',lissy);self.p1.setLabel('bottom',lissx)
        self.p1.getAxis('left').setGrid(170)
        self.p1.getAxis('bottom').setGrid(170)

        self.lissvLine = pg.InfiniteLine(angle=90, movable=False,pen=[100,100,200,200])
        self.p1.addItem(self.lissvLine, ignoreBounds=True)
        self.lisshLine = pg.InfiniteLine(angle=0, movable=False,pen=[100,100,200,200])
        self.p1.addItem(self.lisshLine, ignoreBounds=True)
        self.vb = self.p1.vb
        self.lissproxy = pg.SignalProxy(self.p1.scene().sigMouseClicked, rateLimit=60, slot=self.lissMouseClicked)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号