Graph.py 文件源码

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

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

        self.compressLabel(self.rbwList)

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

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

        except Exception as _err:
            print(_err)
            logging.exception(_err)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号