本文整理汇总了Python中matplotlib.backend_bases.NavigationToolbar2类的典型用法代码示例。如果您正苦于以下问题:Python NavigationToolbar2类的具体用法?Python NavigationToolbar2怎么用?Python NavigationToolbar2使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NavigationToolbar2类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: release_pan
def release_pan(self, event):
pos = (event.x, event.y)
self.callBackHideOverlay()
NavigationToolbar2.release_pan(self, event)
if event.button != 2:
if self.panPos and self.panPos != pos:
self.clear_auto()
self.panPos = None
示例2: __init__
def __init__(self, canvas, wind):
self.wind = wind
#wx.ToolBar.__init__(self, canvas.GetParent(), -1)
aui.AuiToolBar.__init__(self, wind, -1, wx.DefaultPosition, wx.DefaultSize, agwStyle=aui.AUI_TB_DEFAULT_STYLE | aui.AUI_TB_OVERFLOW | aui.AUI_TB_VERTICAL)
NavigationToolbar2.__init__(self, canvas)
self.canvas = canvas
self._idle = True
self.statbar = None
示例3: __init__
def __init__( self, parent, canvas ):
self.canvas = canvas
qt.QWidget.__init__( self, parent )
# Layout toolbar buttons horizontally.
self.layout = qt.QHBoxLayout( self )
self.layout.setMargin( 2 )
NavigationToolbar2.__init__( self, canvas )
示例4: __init__
def __init__(self, canvas, parent):
self.canvas = canvas
QtGui.QWidget.__init__(self, parent)
self.layout = QtGui.QHBoxLayout(self)
self.layout.setMargin(0)
self.layout.setSpacing(0)
NavigationToolbar2.__init__(self, canvas)
示例5: __init__
def __init__(self, canvas, parent, coordinates=True):
""" coordinates: should we show the coordinates on the right? """
self.canvas = canvas
self.coordinates = coordinates
self._actions = {}
"""A mapping of toolitem method names to their QActions"""
QtGui.QToolBar.__init__(self, parent)
NavigationToolbar2.__init__(self, canvas)
示例6: update
def update(self):
_focus = windowing.FocusManager()
self._axes = self.canvas.figure.axes
naxes = len(self._axes)
#if not hasattr(self, "omenu"):
# self.set_active(range(naxes))
# self.omenu = AxisMenu(master=self, naxes=naxes)
#else:
# self.omenu.adjust(naxes)
NavigationToolbar2.update(self)
示例7: __init__
def __init__(self, canvas, view, subplots=False):
self.view = view
self.main_window = view.locate_widget('main_window')
self.toolbar = view.locate_widget('toolbar')
self.statusbar = view.locate_widget('statusbar')
self.subplots = subplots
#Gtk.Toolbar.__init__(self)
NavigationToolbar2.__init__(self, canvas)
self._idle_draw_id = 0
view.ui.main_frame.connect('destroy', self.on_destroy)
示例8: __init__
def __init__(self , parent , canvas , direction = 'h' ) :
#NavigationToolbar.__init__(self,parent,canevas)
#self.layout = QVBoxLayout( self )
self.canvas = canvas
QWidget.__init__( self, parent )
if direction=='h' :
self.layout = QHBoxLayout( self )
else :
self.layout = QVBoxLayout( self )
self.layout.setMargin( 2 )
self.layout.setSpacing( 0 )
NavigationToolbar2.__init__( self, canvas )
示例9: forward
def forward(self, event):
self.callBackHideOverlay()
NavigationToolbar2.forward(self, event)
self.clear_auto()
示例10: update
def update(self):
_focus = windowing.FocusManager()
self._axes = self.canvas.figure.axes
NavigationToolbar2.update(self)
示例11: __init__
def __init__(self, canvas, window):
self.canvas = canvas
self.window = window
NavigationToolbar2.__init__(self, canvas)
示例12: drag_pan
def drag_pan(self, event):
if not self.panPos:
self.panPos = (event.x, event.y)
NavigationToolbar2.drag_pan(self, event)
示例13: __init__
def __init__(self, canvas, window):
self.win = window
GObject.GObject.__init__(self)
NavigationToolbar2.__init__(self, canvas)
self.ctx = None
示例14: release_zoom
def release_zoom(self, event):
self.callBackHideOverlay()
NavigationToolbar2.release_zoom(self, event)
self.clear_auto()
示例15: __init__
def __init__(self, canvas, window):
self.canvas = canvas
self.window = window
self._idle = True
#Tk.Frame.__init__(self, master=self.canvas._tkcanvas)
NavigationToolbar2.__init__(self, canvas)