本文整理汇总了Python中qwt.QwtPlotCurve.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QwtPlotCurve.__init__方法的具体用法?Python QwtPlotCurve.__init__怎么用?Python QwtPlotCurve.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qwt.QwtPlotCurve
的用法示例。
在下文中一共展示了QwtPlotCurve.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from qwt import QwtPlotCurve [as 别名]
# 或者: from qwt.QwtPlotCurve import __init__ [as 别名]
def __init__(self, x=[], y=[], dx=None, dy=None, curvePen=None,
curveStyle=None, curveSymbol=None, errorPen=None,
errorCap=0, errorOnTop=False):
"""A curve of x versus y data with error bars in dx and dy.
Horizontal error bars are plotted if dx is not None.
Vertical error bars are plotted if dy is not None.
x and y must be sequences with a shape (N,) and dx and dy must be
sequences (if not None) with a shape (), (N,), or (2, N):
- if dx or dy has a shape () or (N,), the error bars are given by
(x-dx, x+dx) or (y-dy, y+dy),
- if dx or dy has a shape (2, N), the error bars are given by
(x-dx[0], x+dx[1]) or (y-dy[0], y+dy[1]).
curvePen is the pen used to plot the curve
curveStyle is the style used to plot the curve
curveSymbol is the symbol used to plot the symbols
errorPen is the pen used to plot the error bars
errorCap is the size of the error bar caps
errorOnTop is a boolean:
- if True, plot the error bars on top of the curve,
- if False, plot the curve on top of the error bars.
"""
QwtPlotCurve.__init__(self)
if curvePen is None:
curvePen = QPen(Qt.NoPen)
if curveStyle is None:
curveStyle = QwtPlotCurve.Lines
if curveSymbol is None:
curveSymbol = QwtSymbol()
if errorPen is None:
errorPen = QPen(Qt.NoPen)
self.setData(x, y, dx, dy)
self.setPen(curvePen)
self.setStyle(curveStyle)
self.setSymbol(curveSymbol)
self.errorPen = errorPen
self.errorCap = errorCap
self.errorOnTop = errorOnTop
示例2: __init__
# 需要导入模块: from qwt import QwtPlotCurve [as 别名]
# 或者: from qwt.QwtPlotCurve import __init__ [as 别名]
def __init__(self, *args):
QwtPlotCurve.__init__(self, *args)
self.setRenderHint(QwtPlotItem.RenderAntialiased)