当前位置: 首页>>代码示例>>Python>>正文


Python FigureCanvasGTK3Cairo.set_hexpand方法代码示例

本文整理汇总了Python中matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo.set_hexpand方法的典型用法代码示例。如果您正苦于以下问题:Python FigureCanvasGTK3Cairo.set_hexpand方法的具体用法?Python FigureCanvasGTK3Cairo.set_hexpand怎么用?Python FigureCanvasGTK3Cairo.set_hexpand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo的用法示例。


在下文中一共展示了FigureCanvasGTK3Cairo.set_hexpand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo [as 别名]
# 或者: from matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo import set_hexpand [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()
开发者ID:benzea,项目名称:nco,代码行数:83,代码来源:parameterize_nco.py


注:本文中的matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo.set_hexpand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。