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


Python NavigationToolbar2QT.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4 import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt4.NavigationToolbar2QT import __init__ [as 别名]
    def __init__(self, canvas, frame, name=None):
        """ Create a new toolbar object

        Parameters
        ----------
        data_collection : DataCollection instance
         The data collection that this toolbar is meant to edit.
         The toolbar looks to this collection for the available subsets
         to manipulate.
        canvas : Maptloblib canvas instance
         The drawing canvas to interact with
        frame : QWidget
         The QT frame that the canvas is embedded within.
        """
        self.buttons = {}
        self.__active = None
        self.basedir = None
        NavigationToolbar2QT.__init__(self, canvas, frame)
        if name is not None:
            self.setWindowTitle(name)
        self.setIconSize(QtCore.QSize(25, 25))
        self.layout().setSpacing(1)
        self.setFocusPolicy(Qt.StrongFocus)
        self._idKey = None

        # pyside is prone to segfaults if slots hold the only
        # reference to a signal, so we hold an extra reference
        # see https://bugreports.qt-project.org/browse/PYSIDE-88
        self.__signals = []
开发者ID:Spencerx,项目名称:glue,代码行数:31,代码来源:glue_toolbar.py

示例2: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4 import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt4.NavigationToolbar2QT import __init__ [as 别名]
    def __init__(self , canvas , parent , direction = 'h' ) :
        #NavigationToolbar.__init__(self,parent,canvas)
        #self.layout = QVBoxLayout( self )
        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, parent ) 
开发者ID:limu007,项目名称:Charlay,代码行数:13,代码来源:canvas.py

示例3: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4 import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt4.NavigationToolbar2QT import __init__ [as 别名]
    def __init__(self, canvas, parent, coordinates=True):
        """
        Constructor of NavToolBar

        :param canvas: the matplotlib canvas
        :type canvas: matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg
        :param parent: the parent QWidget
        :type parent: PyQt4.QtGui.QWidget
        :param coordinates: boolean coordinates
        :type coordinates: bool
        """
        NavigationToolbar2QT.__init__(self, canvas, parent, coordinates)
        self.setIconSize(QSize(16, 16))
开发者ID:MiRichter,项目名称:OptiSim,代码行数:15,代码来源:navtoolbar.py

示例4: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4 import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt4.NavigationToolbar2QT import __init__ [as 别名]
    def __init__(self, canvas, frame, name=None):
        """ Create a new toolbar object

        Parameters
        ----------
        data_collection : DataCollection instance
         The data collection that this toolbar is meant to edit.
         The toolbar looks to this collection for the available subsets
         to manipulate.
        canvas : Maptloblib canvas instance
         The drawing canvas to interact with
        frame : QWidget
         The QT frame that the canvas is embedded within.
        """
        self.buttons = {}
        self.basedir = None
        NavigationToolbar2QT.__init__(self, canvas, frame)
        if name is not None:
            self.setWindowTitle(name)
        self.setIconSize(QtCore.QSize(25, 25))
        self.layout().setSpacing(1)
        self.setFocusPolicy(Qt.StrongFocus)
开发者ID:drphilmarshall,项目名称:glue,代码行数:24,代码来源:glue_toolbar.py

示例5: __init__

# 需要导入模块: from matplotlib.backends.backend_qt4 import NavigationToolbar2QT [as 别名]
# 或者: from matplotlib.backends.backend_qt4.NavigationToolbar2QT import __init__ [as 别名]
 def __init__(self, canvas, parent, coordinates=False):
     NavigationToolbar2QT.__init__(self, canvas, parent, coordinates)
     self.setIconSize(QtCore.QSize(20, 20)) # to change size of icons in toolbar
开发者ID:neutrons,项目名称:GUI_Tools,代码行数:5,代码来源:mplwidget.py


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