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


Python QwtPlotCurve.__init__方法代码示例

本文整理汇总了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
开发者ID:PierreRaybaut,项目名称:plotpy,代码行数:50,代码来源:ErrorBarDemo.py

示例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)
开发者ID:petebachant,项目名称:python-qwt,代码行数:5,代码来源:CPUplot.py


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