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)
评论列表
文章目录