graph.py 文件源码

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

项目:PyEveLiveDPS 作者: ArtificialQualia 项目源码 文件源码
def __init__(self, parent, settings, labelHandler, **kwargs):
        tk.Frame.__init__(self, parent, **kwargs)

        self.parent = parent
        self.labelHandler = labelHandler
        self.settings = settings

        self.degree = 5
        self.windowWidth = self.settings.getWindowWidth()

        self.graphFigure = Figure(figsize=(4,2), dpi=100, 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", direction="in")
        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=(30/self.windowWidth), bottom=(15/self.windowWidth), 
                                         right=1, top=(1-15/self.windowWidth), wspace=0, hspace=0)

        self.canvas = FigureCanvasTkAgg(self.graphFigure, self)
        self.canvas.get_tk_widget().configure(bg="black")
        self.canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)

        self.canvas.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号