本文整理匯總了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