本文整理汇总了Python中matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo.mpl_disconnect方法的典型用法代码示例。如果您正苦于以下问题:Python FigureCanvasGTK3Cairo.mpl_disconnect方法的具体用法?Python FigureCanvasGTK3Cairo.mpl_disconnect怎么用?Python FigureCanvasGTK3Cairo.mpl_disconnect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo
的用法示例。
在下文中一共展示了FigureCanvasGTK3Cairo.mpl_disconnect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MyWindow
# 需要导入模块: from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo [as 别名]
# 或者: from matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo import mpl_disconnect [as 别名]
#.........这里部分代码省略.........
thebox.pack_start(label2,False,False,0)
thebox.pack_start(self.max_phd_entry,False,False,0)
mainbox.pack_start(thebox,True,True,0)
mainbox.pack_start(self.ok_button,True,False,0)
mainbox.show()
thebox.show()
self.phd_window.show()
@timing
def phd_entry_button_clicked(self, widget):
min_phd = int(self.min_phd_entry.get_text())
max_phd = int(self.max_phd_entry.get_text())
self.phd_window.destroy()
self.statusbar.push(0, 'Filtering by: ' + str(min_phd) + ' < PHD < ' + str(max_phd))
self.orders = []
self.science(self.photon_list, min_phd, max_phd)
@timing
def on_add_orders_button_clicked(self, widget, data):
if [self.add_orders_button.get_active()] == [True]:
self.remove_orders_button.set_sensitive(False)
self.statusbar.push(data, 'Click where to add an order.')
def onclick_peak(event):
if self.add_orders_button.get_active():
self.add_order(event.ydata)
self.cid_add = self.canvas.mpl_connect('button_press_event', onclick_peak)
else:
self.canvas.mpl_disconnect(self.cid_add)
del self.cid_add
self.remove_orders_button.set_sensitive(True)
self.statusbar.push(0, 'Opened File:' + self.filename)
@timing
def add_order(self, ydata):
order = ydata
print 'Number of original orders', len(self.orders)
self.orders.append(order)
self.orders.sort()
self.update_orders_plot(self.peaks_smoothed, self.orders)
self.recalculate_button.set_sensitive(True)
print 'Corrected number of orders', len(self.orders)
@timing
def on_remove_orders_button_clicked(self, widget, data):
if [self.remove_orders_button.get_active()] == [True]:
self.add_orders_button.set_sensitive(False)
self.statusbar.push(data, 'Click on the order to remove.')
def onclick_order(event):
if self.remove_orders_button.get_active():
self.remove_order(event.ydata)
self.cid_remove = self.canvas.mpl_connect('button_press_event', onclick_order)