playbackFrame.py 文件源码

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

项目:PyEveLiveDPS 作者: ArtificialQualia 项目源码 文件源码
def makeGraph(self):
        self.graphFigure = Figure(figsize=(1,0.1), dpi=50, facecolor="black")

        self.subplot = self.graphFigure.add_subplot(1,1,1, facecolor=(0.3, 0.3, 0.3))
        self.subplot.tick_params(axis="y", colors="grey", labelbottom="off", bottom="off")
        self.subplot.tick_params(axis="x", colors="grey", labelbottom="off", bottom="off")

        self.graphFigure.axes[0].get_xaxis().set_ticklabels([])
        self.graphFigure.subplots_adjust(left=0, bottom=0, right=1, top=1, wspace=0, hspace=0)

        self.graphCanvas = FigureCanvasTkAgg(self.graphFigure, self)
        self.graphCanvas.get_tk_widget().configure(bg="black")
        self.graphCanvas.get_tk_widget().grid(row="2", column="2", columnspan="3", sticky="news")

        yValues = self.mainWindow.characterDetector.playbackLogReader.logEntryFrequency
        self.highestValue = 0
        for value in yValues:
            if value > self.highestValue: self.highestValue = value
        self.subplot.plot(yValues, "dodgerblue")
        self.timeLine, = self.subplot.plot([0, 0], [0, self.highestValue], "white")
        #self.graphFigure.axes[0].set_xlim(0, len(yValues))
        self.subplot.margins(0.005,0.01)

        self.graphCanvas.show()
        self.mainWindow.makeDraggable(self.graphCanvas.get_tk_widget())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号