本文整理汇总了Python中matplotlib.backends.backend_tkagg.FigureCanvasTkAgg.delete方法的典型用法代码示例。如果您正苦于以下问题:Python FigureCanvasTkAgg.delete方法的具体用法?Python FigureCanvasTkAgg.delete怎么用?Python FigureCanvasTkAgg.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_tkagg.FigureCanvasTkAgg
的用法示例。
在下文中一共展示了FigureCanvasTkAgg.delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: wishbone_gui
# 需要导入模块: from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg [as 别名]
# 或者: from matplotlib.backends.backend_tkagg.FigureCanvasTkAgg import delete [as 别名]
#.........这里部分代码省略.........
self.updateButton = tk.Button(self, text=u"Update component", command=self.updateComponent, state='disabled')
self.updateButton.grid(column=3, row=0)
#enable buttons based on current state of scdata object
if self.scdata.pca:
self.analysisMenu.entryconfig(1, state='normal')
self.visMenu.entryconfig(0, state='normal')
self.PCAButton.config(state='normal')
if isinstance(self.scdata.tsne, pd.DataFrame):
self.analysisMenu.entryconfig(2, state='normal')
self.visMenu.entryconfig(1, state='normal')
self.visMenu.entryconfig(5, state='normal')
self.tSNEButton.config(state='normal')
self.geneExpButton.config(state='normal')
if isinstance(self.scdata.diffusion_eigenvectors, pd.DataFrame):
self.analysisMenu.entryconfig(3, state='normal')
self.analysisMenu.entryconfig(4, state='normal')
self.visMenu.entryconfig(2, state='normal')
self.DMButton.config(state='normal')
else:
self.tSNEButton = tk.Button(self, text=u"tSNE", state='disabled', command=self.plotTSNE)
self.tSNEButton.grid(column=0, row=2)
self.DMButton = tk.Button(self, text=u"Diffusion map", state='disabled', command=self.plotDM)
self.DMButton.grid(column=0, row=3)
self.WBButton = tk.Button(self, text=u"Wishbone", state='disabled', command=self.plotWBOnTsne)
self.WBButton.grid(column=0, row=4)
self.geneExpButton = tk.Button(self, text=u"Gene expression", state='disabled', command=self.plotGeneExpOntSNE)
self.geneExpButton.grid(column=0, row=5)
self.setGateButton = tk.Button(self, text=u"Set gate", state='disabled', command=self.setGate)
self.setGateButton.grid(column=0, row=6)
self.saveButton = tk.Button(self, text=u"Save plot", state='disabled', command=self.savePlot)
self.saveButton.grid(column = 4, row=0)
self.analysisMenu.delete(0)
self.analysisMenu.delete(2)
self.visMenu.delete(0)
self.visMenu.delete(2)
self.analysisMenu.entryconfig(1, state='normal')
#enable buttons based on current state of scdata object
if isinstance(self.scdata.tsne, pd.DataFrame):
self.visMenu.entryconfig(0, state='normal')
self.visMenu.entryconfig(3, state='normal')
self.tSNEButton.config(state='normal')
self.geneExpButton.config(state='normal')
if isinstance(self.scdata.diffusion_eigenvectors, pd.DataFrame):
self.analysisMenu.entryconfig(2, state='normal')
self.visMenu.entryconfig(1, state='normal')
self.DMButton.config(state='normal')
#enable buttons
self.analysisMenu.entryconfig(0, state='normal')
self.fileMenu.entryconfig(1, state='normal')
if self.wb:
if isinstance(self.wb.trajectory, pd.Series):
self.wishboneMenu.entryconfig(0, state='normal')
self.wishboneMenu.entryconfig(1, state='normal')
self.wishboneMenu.entryconfig(2, state='normal')
self.WBButton.config(state='normal')
#get genes
self.genes = self.scdata.data.columns.values
self.gates = {}
self.geometry('800x550')
#destroy pop up menu
self.fileInfo.destroy()