Graph.py 文件源码

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

项目:TMV3 作者: HenricusRex 项目源码 文件源码
def setLineATT(self):

        self.compressLabel(self.attList)

        try:
            x1 = []
            x1pos = []
            labels1 = []
            j = -1
            x1pos.append(0)
            labels1.append('')
           # self.setTestData()
            for i in self.attList:
                if i.startX > j:
                    x1.append(i.startX)
                    j = i.startX
                x1.append(i.stopX)
                x1pos.append(i.labelPos)
                labels1.append(i.label)


       #     self.par4.spines["bottom"].set_position(("outward", 90))
       #     self.par4.xaxis.set_ticks_position('bottom')
           # # self.par1.set_xlim(1e3,1e9)
           #  self.par4.set_xscale('log')
            self.par4.xaxis.set_major_formatter(ticker.NullFormatter())
            self.par4.xaxis.set_minor_locator(ticker.FixedLocator(x1pos))
            self.par4.xaxis.set_minor_formatter(ticker.FixedFormatter(labels1))
            self.par4.xaxis.set_ticks(x1)
            self.par4.xaxis.set_tick_params(which='minor',length=1,direction='out', pad=5, labelbottom='on')
            self.par4.xaxis.set_tick_params(which='major',length=10,direction='out', pad=5,labelbottom='on')

            _Ret = self.par4.xaxis.get_minorticklabels()
            n = 0
            for i in _Ret:
                if self.attList[n].color =='r':
                    i._color = 'red'
                if n < len(self.attList) - 1:
                    n += 1

          #  self.signalGraphUpdate.emit()
        except Exception as _err:
            print(_err)
            logging.exception(_err)
        pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号