本文整理汇总了Python中matplotlib.backends.backend_qt5agg.NavigationToolbar2QT.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python NavigationToolbar2QT.__init__方法的具体用法?Python NavigationToolbar2QT.__init__怎么用?Python NavigationToolbar2QT.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_qt5agg.NavigationToolbar2QT
的用法示例。
在下文中一共展示了NavigationToolbar2QT.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt5agg.NavigationToolbar2QT import __init__ [as 别名]
def __init__(self, *args, **kwargs):
NavigationToolbar2QT.__init__(self, *args, **kwargs)
self.init_buttons()
self.panAction.setCheckable(True)
self.zoomAction.setCheckable(True)
# remove the subplots action
self.removeAction( self.subplotsAction )
示例2: __init__
# 需要导入模块: from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt5agg.NavigationToolbar2QT import __init__ [as 别名]
def __init__(self, canvas_, parent_):
# backend.figureoptions = None # Monkey patched to kill the figure options button on matplotlib toolbar
# self.toolitems = (
# ('Home', 'Reset original view', 'home', 'home'),
# ('Back', 'Back to previous view', 'back', 'back'),
# ('Forward', 'Forward to next view', 'forward', 'forward'),
# (None, None, None, None),
# ('Pan', 'Pan axes with left mouse, zoom with right', 'move', 'pan'),
# ('Zoom', 'Zoom to rectangle', 'zoom_to_rect', 'zoom'),
# (None, None, None, None),
# ('Save', 'Save the current image', 'filesave', 'save_figure'),
# )
NavigationToolbar2QT.__init__(self, canvas_, parent_)
示例3: __init__
# 需要导入模块: from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt5agg.NavigationToolbar2QT import __init__ [as 别名]
def __init__(self, parent, canvas):
""" Initialization
built-in methods
- drag_zoom(self, event): triggered during holding the mouse and moving
"""
NavigationToolbar2QT.__init__(self, canvas, canvas)
# parent
self._myParent = parent
# tool bar mode
self._myMode = NAVIGATION_MODE_NONE
# connect the events to parent
self.home_button_pressed.connect(self._myParent.evt_toolbar_home)
self.canvas_zoom_released.connect(self._myParent.evt_zoom_released)
示例4: __init__
# 需要导入模块: from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt5agg.NavigationToolbar2QT import __init__ [as 别名]
def __init__(self, canvas, parent, coordinates=True):
NavigationToolbar.__init__(self, canvas, parent, coordinates)
self.setIconSize(QtCore.QSize(15, 15))
示例5: __init__
# 需要导入模块: from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt5agg.NavigationToolbar2QT import __init__ [as 别名]
def __init__(self, plotCanvas, parent):
NavigationToolbar.__init__(self, plotCanvas, parent)