本文整理汇总了Python中matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python NavigationToolbar2GTKAgg.__init__方法的具体用法?Python NavigationToolbar2GTKAgg.__init__怎么用?Python NavigationToolbar2GTKAgg.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg
的用法示例。
在下文中一共展示了NavigationToolbar2GTKAgg.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg [as 别名]
# 或者: from matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg import __init__ [as 别名]
def __init__(self, window, movie_frames, movie_file_maker):
# set MPL NavigationToolbar
NavigationToolbar2GTKAgg.__init__(self, movie_frames.canvas, window)
# ===================================
# movie file maker
# ===================================
self.mfm = movie_file_maker
self.mfm.set_update_number_of_recorded_frames_function(self.update_saved_frames_numer)
# Make Movie Button -----------------
self.button_make_movie=gtk.ToolButton(gtk.STOCK_CDROM)
self.button_make_movie.set_tooltip_text("Make movie file")
# callback
self.button_make_movie.connect("clicked",self.make_movie_callback)
# pack button into tollbar
self.insert(gtk.SeparatorToolItem(),8)
self.insert(self.button_make_movie,9)
# -----------------------------------
# number of saved frames ------------
self.saved_frames_label=gtk.Label('0')
self.saved_frames_label.set_width_chars(4)
# hbox with labels
hbox=gtk.HBox()
hbox.pack_start(gtk.Label('recorded:'),False,padding=3)
hbox.pack_start(self.saved_frames_label,False)
# tool item -- wrapper for hbox
toolitem=gtk.ToolItem()
toolitem.add(hbox)
# pack them into tollbar
self.insert(toolitem,10)
self.insert(gtk.SeparatorToolItem(),11)
示例2: __init__
# 需要导入模块: from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg [as 别名]
# 或者: from matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg import __init__ [as 别名]
def __init__(self, canvas, window, steps):
NavigationToolbar2GTKAgg.__init__(self, canvas, window)
item = self.get_nth_item(8)
self.remove(item)
self.playbutton = PlayButton()
self.positionscale = PositionScale(steps)
self.savemoviebutton = gtk.ToolButton(gtk.STOCK_SAVE_AS)
self.insert(gtk.SeparatorToolItem(), 8)
self.insert(self.playbutton, 9)
self.insert(self.savemoviebutton, 10)
self.insert(self.positionscale, 11)
self.savemoviebutton.connect("clicked", self.handle_save_movie)
示例3: __init__
# 需要导入模块: from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg [as 别名]
# 或者: from matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg import __init__ [as 别名]
def __init__(self, cube, canvas, parent_window):
self.cube = cube
NavigationToolbar2GTKAgg.__init__(self, canvas, parent_window)
示例4: __init__
# 需要导入模块: from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg [as 别名]
# 或者: from matplotlib.backends.backend_gtkagg.NavigationToolbar2GTKAgg import __init__ [as 别名]
def __init__(self, canvas, window):
NavigationToolbar.__init__(self, canvas, window)
self.comments = ''
self.annotate = None
self.page_setup=None
self.settings = None