本文整理汇总了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))
示例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)
示例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])
示例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
示例5: __init__
# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import __init__ [as 别名]
def __init__(self, *args, **kargs):
PlotWidget.__init__(self,**kargs)