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


Python PlotWidget.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import __init__ [as 别名]
 def __init__(self, parent=None, scale_min=0, scale_max=1, steps=0.1, title='None'):
     setConfigOption('background', 'w')
     PlotWidget.__init__(self,  parent, enableMenu=False, border=False, title=title)
     self.range_ = arange(scale_min, scale_max, steps)
     self.curve = self.plot(self.range_, zeros([len(self.range_)]), clear=False, pen='b')
     # self.curve2 = self.plot(self.range_, zeros([len(self.range_)]) + 0.5, clear=False, pen='r')
     self.disableAutoRange()
     self.setRange(xRange=(scale_min, scale_max))
开发者ID:magicangleimperial,项目名称:pyscanMRI,代码行数:10,代码来源:pyqtgraphwidget.py

示例2: __init__

# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import __init__ [as 别名]
 def __init__(self,settings):
     PlotWidget.__init__(self)
     self.trace = self.plot(
         [0],
         [0],
         pen=None,
         symbol='o',
         symbolPen=None,
         symbolSize=3
     )
     self.update_settings(settings)
开发者ID:creilly,项目名称:sitzlabrad,代码行数:13,代码来源:augergui.py

示例3: __init__

# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     """
     **Properties**
     
         *_plotitem* (:class:`pyqtgraph.PlotItem`):
             Just a shortcut to the PlotItem.
         *selected* (boolean):
             Whether or not this widget is selected.
         *inFocus* (boolean):
             Whether or not this widget has a mouse hovering it.
         *_std* (tuple of integer):
             The default size of this widget.
         *bgs* (dictionary):
             A dictionary containing the different backgrounds 
             this widget can have.
         *_bg* (:class:`PyQt4.QtGui.QColor`):
             The current background color of this widget.
     
     """
     PlotWidget.__init__(self, *args, **kwargs)
     self.setMenuEnabled(False)
     self.setAntialiasing(True)
     self.hideButtons()
     self.setMouseEnabled(False, False)
     self.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
     self.setMouseTracking(True)
     self.hideAxis("bottom")
     self.hideAxis("left")
     
     #properties{
     self._plotitem = self.getPlotItem()
     self.selected = False
     self.inFocus = False
     self._std = (200, 150)
     self.bgs = {"normal":mkColor('w'), "selected":mkColor(0.8), "inFocus":mkColor(0.9)}
     self._bg = self.bgs["normal"]
     #}
     self.setFixedSize(self._std[0], self._std[1])
开发者ID:INM-6,项目名称:swan,代码行数:40,代码来源:myplotwidget.py

示例4: __init__

# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import __init__ [as 别名]
    def __init__(self, parent=None, background='default', axisItems=None):
        PlotWidget.__init__(self, parent=parent, background=background,
                            axisItems=axisItems)
        PyDMPrimitiveWidget.__init__(self)

        self.plotItem = self.getPlotItem()
        self.plotItem.hideButtons()
        self._auto_range_x = None
        self.setAutoRangeX(True)
        self._auto_range_y = None
        self.setAutoRangeY(True)
        self._min_x = 0.0
        self._max_x = 1.0
        self._min_y = 0.0
        self._max_y = 1.0
        self._show_x_grid = None
        self.setShowXGrid(False)
        self._show_y_grid = None
        self.setShowYGrid(False)

        self._show_right_axis = False

        self.redraw_timer = QTimer(self)
        self.redraw_timer.timeout.connect(self.redrawPlot)

        self._redraw_rate = 30 # Redraw at 30 Hz by default.
        self.maxRedrawRate = self._redraw_rate
        self._curves = []
        self._title = None
        self._show_legend = False
        self._legend = self.addLegend()
        self._legend.hide()

        # Drawing crosshair on the ViewBox
        self.vertical_crosshair_line = None
        self.horizontal_crosshair_line = None
        self.crosshair_movement_proxy = None
开发者ID:slaclab,项目名称:pydm,代码行数:39,代码来源:baseplot.py

示例5: __init__

# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import __init__ [as 别名]
 def __init__(self, *args, **kargs):
     PlotWidget.__init__(self,**kargs)
开发者ID:a-stark,项目名称:qudi,代码行数:4,代码来源:plotwidget_modified.py


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