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


Python NavigationToolbar2QTAgg.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
 def __init__(self, widgimage, parent=None):
     #print 'ImgSpeNavToolBar.__init__'
     self.widgimage  = widgimage
     self.canvas     = self.widgimage.getCanvas()
     fig = self.canvas.figure
     fig.ntbZoomIsOn = False
     NavigationToolbar.__init__( self, self.canvas, parent )
开发者ID:FilipeMaia,项目名称:psdmrepo,代码行数:9,代码来源:ImgSpeNavToolBar.py

示例2: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
 def __init__(self, canvas, parent, browser):
     NavigationToolbar2QTAgg.__init__(self,canvas,parent)
     for c in self.findChildren(QtGui.QToolButton):
         #print str(c.text())
         if str(c.text()) in ('Subplots','Customize','Back','Forward','Home'):
             c.defaultAction().setVisible(False)
     self.parent = parent
     self.browser = browser
开发者ID:de278,项目名称:NeuroDAQ-Analysis,代码行数:10,代码来源:MplWidgets.py

示例3: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
 def __init__(self,canvas,parent):
     #NavigationToolbar.__init__(self,parent,canevas)
     #self.layout = QVBoxLayout( self )
     self.canvas = canvas
     #QtGui.QWidget.__init__(self, parent)
     #self.layout.setMargin( 2 )
     #self.layout.setSpacing( 0 )
     NavigationToolbar.__init__(self, canvas, canvas)
开发者ID:iancze,项目名称:Pysplotter,代码行数:10,代码来源:mplwidget.py

示例4: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
	def __init__(self, *args, **kwargs):
		NavigationToolbar2QTAgg.__init__(self, *args, **kwargs)

		self.init_buttons()
		self.panAction.setCheckable(True)
		self.zoomAction.setCheckable(True)

		# remove the subplots action
		self.removeAction( self.subplotsAction )
开发者ID:luipir,项目名称:ps-speed,代码行数:11,代码来源:plot_wdg.py

示例5: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
    def __init__(self, parent, canvas):
        """ Initialization
        """
        NavigationToolbar2.__init__(self, canvas, canvas)

        self._myParent = parent
        self._navigationMode = MyNavigationToolbar.NAVIGATION_MODE_NONE

        return
开发者ID:spaceyatom,项目名称:mantid,代码行数:11,代码来源:mplgraphicsview.py

示例6: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
    def __init__(self, parent, canvas):
        """ Initialization
        FUTURE: direction='h'
        """
        self.canvas = canvas
        QtGui.QWidget.__init__(self, parent)

        #if direction=='h' :
        #    self.layout = QtGui.QHBoxLayout(self)
        #else :
        #    self.layout = QtGui.QVBoxLayout(self)

        #self.layout.setMargin(2)
        #self.layout.setSpacing(0)

        NavigationToolbar.__init__( self, canvas, canvas )

        return
开发者ID:neutrons,项目名称:GUI_Tools,代码行数:20,代码来源:mplgraphicsview.py

示例7: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
    def __init__(self, canvas, win):
        NavigationToolbar.__init__(self, canvas, win)
        self.win = win
        path = os.path.abspath(__file__)
        dir_path = os.path.dirname(path)
        imagedir = os.path.join(dir_path,'images')

        for text, tooltip_text, image_file, callback in self.mytoolitems:
            if text is None:
                self.addSeparator()
            else:
                a = self.addAction(QtGui.QIcon(os.path.join(imagedir, image_file + ".png")),
                                         text, getattr(self, callback))
                self._actions[callback] = a
                if callback in ['zoom', 'pan']:
                    a.setCheckable(True)
                if tooltip_text is not None:
                    a.setToolTip(tooltip_text)
开发者ID:bsherin,项目名称:shared_tools,代码行数:20,代码来源:matplotlib_window.py

示例8: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
 def __init__(self, canvas, parent):
     
     Navigationtoolbar.__init__(self, canvas, parent)
     self.clearButtons = []
     
     # search through existing buttons
     # next use for placement of custom button
     next = None
     for c in self.findChildren(QtGui.QToolButton):
         if next is None:
             next = c
             
         # don't want to see subplots and customize
         if str(c.text()) in ('Subplots','Customize'):
             c.defaultAction().setVisible(False)
             continue
     
         # need to keep track of pan and zoom buttons
         if str(c.text()) in ('Pan','Zoom'):
             self.clearButtons.append(c)
             next = None
开发者ID:JeanBilheux,项目名称:RefRed,代码行数:23,代码来源:logmatplotlibwidget.py

示例9: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
    def __init__(self, parent, canvas, **params):
        self.params = Params(**params)
        # create the default toolbar
        NavigationToolbar.__init__(self, canvas, parent)
        self.canvas = canvas
        self.data_accessor = self.params.data_accessor  # alias

        # add new toolbar buttons
        normal_plot_action = self.__createAction__(title="Normal plot",
                                            handler=self.__normalPlot__,
                                            iconId='graph_button')
        self.addAction(normal_plot_action)

        scatter_plot_action = self.__createAction__(title="Scatter plot",
                                            handler=self.__scatterPlot__,
                                            iconId='scatter_plot_button')
        self.addAction(scatter_plot_action)

        histogram_plot_action = self.__createAction__(title="Histogram plot",
                                            handler=self.__histogramPlot__,
                                            iconId='histogram_plot_button')
        self.addAction(histogram_plot_action)

        tachogram_plot_settings_action = self.__createAction__(
                                    title="Tachogram plot settings",
                                    handler=self.__showTachogramPlotSettings__,
                                    iconId='tachogram_plot_settings')
        self.addAction(tachogram_plot_settings_action)

        tachogram_plot_statistics_action = self.__createAction__(
                                title="Tachogram plot statistics",
                                handler=self.__showTachogramPlotStatistics__,
                                iconId='tachogram_plot_statistics')
        self.addAction(tachogram_plot_statistics_action)

        data_vector_preview_action = self.__createAction__(
                                title="Data preview",
                                handler=self.__showDataVectorPreview__,
                                iconId='data_vector_preview')
        self.addAction(data_vector_preview_action)
开发者ID:TEAM-HRA,项目名称:hra_suite,代码行数:42,代码来源:tachogram_plot_navigator_toolbar.py

示例10: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
    def __init__(self, canvas, parent=None):
        NavigationToolbar2QTAgg.__init__(self, canvas, parent, False)
        self.parent = parent
        self.ev_time = 0
        self._xypress = []

        #quick function to return icon locs
        icon = lambda l: resfile('aston/qtgui', 'icons/' + l + '.png')

        #remove the plot adjustment buttons
        self.removeAction(self.actions()[-1])
        self.removeAction(self.actions()[-1])
        self.removeAction(self.actions()[-1])

        #add the alignment tool
        if not hasattr(self, '_actions'):
            self._actions = {}
        self._actions['align'] = QtGui.QAction(QtGui.QIcon(icon('align')), \
          self.parent.tr('Align Chromatogram'), self)
        self._actions['align'].setCheckable(True)
        self.addAction(self._actions['align'])
        self._actions['align'].triggered.connect(self.align)

        self.addSeparator()

        #add the peak tool
        self._actions['peak'] = QtGui.QAction(QtGui.QIcon(icon('peak')), \
          self.parent.tr('Add/Delete Peak'), self)
        self._actions['peak'].setCheckable(True)
        self.addAction(self._actions['peak'])
        self._actions['peak'].triggered.connect(self.peak)

        #add the spectra tool
        self._actions['spectrum'] = QtGui.QAction( \
          QtGui.QIcon(icon('spectrum')), self.parent.tr('Get Spectrum'), self)
        self._actions['spectrum'].setCheckable(True)
        self.addAction(self._actions['spectrum'])
        self._actions['spectrum'].triggered.connect(self.spec)
开发者ID:molliewebb,项目名称:aston,代码行数:40,代码来源:PlotNavbar.py

示例11: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
 def __init__(self, show_coords, update_sliders, canvas):
     NavigationToolbar2QTAgg.__init__(self, canvas, None)
     self.show_coords = show_coords
     self.update_sliders = update_sliders
     self.zoom()
开发者ID:RNencib,项目名称:binoculars,代码行数:7,代码来源:gui.py

示例12: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
 def __init__(self, corner_callback, canvas):
     NavigationToolbar2QTAgg.__init__(self, canvas, None)
     self._corner_callback = corner_callback
     self.zoom()
开发者ID:RNencib,项目名称:binoculars,代码行数:6,代码来源:fitaid.py

示例13: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
 def __init__(self, plotCanvas, parent): 
     NavigationToolbar.__init__(self, plotCanvas, parent) 
开发者ID:aluque,项目名称:qtplaskin,代码行数:4,代码来源:mplwidget.py

示例14: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
 def __init__(self, canvas, parent ):
     NavigationToolbar.__init__(self,canvas,parent)
     for c in self.findChildren(QToolButton):
         if str(c.text()) in ('Subplots','Customize','Forward','Back'):
             c.defaultAction().setVisible(False)
             continue 
开发者ID:santhosh-kasa,项目名称:MiSim,代码行数:8,代码来源:UI.py

示例15: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg [as 别名]
# 或者: from matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg import __init__ [as 别名]
    def __init__(self, canvases, tabs, parent=None):
        self.canvases = canvases
        self.tabs = tabs

        NavigationToolbar.__init__(self, canvases[0], parent)
开发者ID:jmarcelogimenez,项目名称:petroFoam,代码行数:7,代码来源:mpl4.py


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