本文整理汇总了Python中matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo.set_vexpand方法的典型用法代码示例。如果您正苦于以下问题:Python FigureCanvasGTK3Cairo.set_vexpand方法的具体用法?Python FigureCanvasGTK3Cairo.set_vexpand怎么用?Python FigureCanvasGTK3Cairo.set_vexpand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo
的用法示例。
在下文中一共展示了FigureCanvasGTK3Cairo.set_vexpand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo [as 别名]
# 或者: from matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo import set_vexpand [as 别名]
def __init__(self, notebook):
self._notebook = notebook
self.data = None
self.params = None
##########
# Time Domain
##########
self.time_domain = Figure()
self.time_domain_ax = self.time_domain.add_subplot('111')
#self.time_domain.tight_layout()
grid = Gtk.Grid()
grid.set_hexpand(True)
grid.set_vexpand(True)
label = Gtk.Label()
label.set_markup("<b>Time Domain</b>")
canvas = FigureCanvas(self.time_domain)
canvas.set_size_request(200, 200)
canvas.set_hexpand(True)
canvas.set_vexpand(True)
toolbar = NavigationToolbar(canvas, notebook.get_toplevel())
grid.attach(canvas, 0, 0, 1, 1)
grid.attach(toolbar, 0, 1, 1, 1)
notebook.append_page(grid, label)
##########
# FFT
##########
self.fft = Figure()
self.fft_ax = self.fft.add_subplot('111')
grid = Gtk.Grid()
grid.set_hexpand(True)
grid.set_vexpand(True)
label = Gtk.Label()
label.set_markup("<b>FFT</b>")
canvas = FigureCanvas(self.fft)
canvas.set_size_request(200, 200)
canvas.set_hexpand(True)
canvas.set_vexpand(True)
toolbar = NavigationToolbar(canvas, notebook.get_toplevel())
grid.attach(canvas, 0, 0, 1, 1)
grid.attach(toolbar, 0, 1, 1, 1)
notebook.append_page(grid, label)
##########
# Phase Error
##########
self.phase_error = Figure()
self.phase_error_ax = self.phase_error.add_subplot('111')
grid = Gtk.Grid()
grid.set_hexpand(True)
grid.set_vexpand(True)
label = Gtk.Label()
label.set_markup("<b>Phase Error</b>")
canvas = FigureCanvas(self.phase_error)
canvas.set_size_request(200, 200)
canvas.set_hexpand(True)
canvas.set_vexpand(True)
toolbar = NavigationToolbar(canvas, notebook.get_toplevel())
grid.attach(canvas, 0, 0, 1, 1)
grid.attach(toolbar, 0, 1, 1, 1)
notebook.append_page(grid, label)
notebook.show_all()