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