本文整理汇总了Python中matplotlib.backends.backend_gtk3agg.FigureCanvasGTK3Agg.copy_from_bbox方法的典型用法代码示例。如果您正苦于以下问题:Python FigureCanvasGTK3Agg.copy_from_bbox方法的具体用法?Python FigureCanvasGTK3Agg.copy_from_bbox怎么用?Python FigureCanvasGTK3Agg.copy_from_bbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_gtk3agg.FigureCanvasGTK3Agg
的用法示例。
在下文中一共展示了FigureCanvasGTK3Agg.copy_from_bbox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ChessAnalogWindow
# 需要导入模块: from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg [as 别名]
# 或者: from matplotlib.backends.backend_gtk3agg.FigureCanvasGTK3Agg import copy_from_bbox [as 别名]
#.........这里部分代码省略.........
#self.liststore[31][1] = 18000
#GObject.timeout_add(200, self.my_timer)
self.timer_id = None
self.plot_id = None
self.f = Figure(figsize=(8,6), dpi=100)
self.a = self.f.add_subplot(111)
#self.line, = self.a.plot([], [], marker = 'x')
#self.line, = self.a.plot([], [])
#self.plt = self.a.plot([0, 1], [0, 3], marker = 'x')
self.a.xaxis.set_animated(True)
self.a.yaxis.set_animated(True)
#self.a.set_xlim([0,5])
self.a.set_xlim([self.fifo_size/SCAN_FREQ, 0])
self.a.set_ylim([0,70000])
self.a.grid(True)
#self.a.set_xscale('log')
#self.a.set_xlim((10.0, 30000.0))
#self.a.set_ylim((-90.0, 3.0))
self.a.set_xlabel("Time")
self.a.set_ylabel("Voltage")
self.lastx = 0
self.my_line, = self.a.plot([], [], animated = True)
self.my_line2, = self.a.plot([], [], animated = True)
self.canvas = FigureCanvas(self.f)
# Clean background
self.clean_bg = self.canvas.copy_from_bbox(self.f.bbox)
self.background = self.canvas.copy_from_bbox(self.get_bg_bbox(self.a))
self.old_size = self.a.bbox.width, self.a.bbox.height
self.canvas.draw()
self.do_redraw = False
#self.plot_timer = self.canvas.new_timer(interval = 42)
# self.anim = ma.FuncAnimation(self.f,
# self.update_plots,
# event_source = self.plot_timer,
# init_func = self.init_blit_plot,
# repeat = False,
# blit = True)
#print(dir(self.anim))
#self.anim._stop()
#self.plot_timer.stop()
self.master_hbox.pack_start(self.canvas, True, True, 0)
#self.plot_timer.stop()
self.connect("check-resize", self.win_resize)
def acquire_cb(self, state):
#print("acq callback")
#print(state)
if (self.action_acq.get_active()):
# This is commented because it seems that comedi_cancel()
# clears stale data in the fd and card?
#data = os.read(self.fd, BUF_SIZE)