def setValues(self, values ): numValues = len(values) #QVector<QwtIntervalSample> samples( numValues ) samples = [] for i in range(numValues): interval = Qwt.QwtInterval( i , i + 1.0 ) interval.setBorderFlags( Qwt.QwtInterval.ExcludeMaximum ) samples.append(Qwt.QwtIntervalSample( values[i], interval )) self.setSamples( samples )
def __init__(self): Qwt.QwtRasterData.__init__(self) self.setInterval(Qt.XAxis, Qwt.QwtInterval(-1.5, 1.5)) self.setInterval(Qt.YAxis, Qwt.QwtInterval(-1.5, 1.5)) self.setInterval(Qt.ZAxis, Qwt.QwtInterval(0.0, 10.0))