def __init__(self): Curve.__init__(self) self.setStyle( Qwt.QwtPlotCurve.Lines ) self.setPen( QColor( 100, 200, 150 ), 2 ) curveFitter = Qwt.QwtSplineCurveFitter() curveFitter.setFitMode( Qwt.QwtSplineCurveFitter.ParametricSpline ) curveFitter.setSplineSize( 200 ) self.setCurveFitter( curveFitter ) self.setCurveAttribute( Qwt.QwtPlotCurve.Fitted, True ) # somewhere in the top right corner transform = QTransform() transform.translate( 7.0, 7.5 ) transform.scale( 2.0, 2.0 ) self.setTransformation( transform )
def __init__(self): Curve.__init__(self) self.setPen( QColor( 150, 150, 200 ), 2 ) self.setStyle( Qwt.QwtPlotCurve.Lines ) curveFitter = Qwt.QwtSplineCurveFitter() curveFitter.setSplineSize( 150 ) self.setCurveFitter( curveFitter ) self.setCurveAttribute( Qwt.QwtPlotCurve.Fitted, True ) symbol = Qwt.QwtSymbol( Qwt.QwtSymbol.XCross ) symbol.setPen( Qt.yellow ) symbol.setSize( 7 ) self.setSymbol( symbol ) # somewhere to the left self.transform = QTransform() self.transform.scale( 1.5, 1.0 ); self.transform.translate( 1.5, 3.0 ); self.setTransformation( self.transform )