Hi,

I am trying to plot a simple horizontal line in my QwtPlot. I have a plot with DateTimeScaleEngine (X-Axis) and a 'normal' y-axis with values 0-255.
How can I draw a horizontal line into this plot? This const. line will represent the mean value.

I don't want to fill the curve, just a line.

I tried f.e. this:

Qt Code:
  1. self.meanline = QwtPlotCurve()
  2. self.meanline.setPen(QPen(Qt.green,2))
  3. self.meanline.setStyle(QwtPlotCurve.NoCurve)
  4. self.meanline.setCurveType(QwtPlotCurve.Yfx)
  5. self.meanline.attach(self.qwtPlot)
To copy to clipboard, switch view to plain text mode 

All my tests failed!

Thanks!