main.py 文件源码

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

项目:Dame 作者: jdhouti 项目源码 文件源码
def create_canvas(self):
        """Creates a canvas object to draw matplotlib visualizations on
            self.f - Figure - contains the figure object for all of the subplots
            self.a - Plot - the plot in question.
            self.canvas - FigureCanvasTkAgg - tkinter widget that holds figure"""


        self.f = Figure(figsize = (6,4), dpi = 100)
        self.a = self.f.add_subplot(111)

        self.canvas = FigureCanvasTkAgg(self.f, master=self)
        self.canvas.get_tk_widget().grid(column=3, row=1, rowspan=5, columnspan = 6, sticky="nesw")

        self.toolbar = NavigationToolbar2TkAgg(self.canvas, self.master) #do we want to keep this? it allows the user to save the plot so probs useful
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号