def __init__(self, dark):
self.figure = Figure(figsize=(0, 1000), dpi=75, facecolor='w', edgecolor='k')
self.axes = self.figure.add_axes([0.12, 0.08, 0.75, 0.90])
self.figure.patch.set_alpha(0)
self.axes.margins(0, 0.05)
self.axes.ticklabel_format(useOffset=False)
self.axes.xaxis.set_major_locator(MultipleLocatorWithMargin(600, 0, 0.03))
self.axes.xaxis.set_major_formatter(ticker.FuncFormatter(lambda x, pos: "{}m".format(int(x/60))))
if dark:
self.axes.patch.set_facecolor('black')
FigureCanvas.__init__(self, self.figure)
self.set_size_request(400, 300)
self.lines = {}
self.texts = {}
评论列表
文章目录