Hi,
I'd appreciate some help with the following. If you set some raw data on a QwtPlotCurve, how can you make the plot draw consecutive samples in consecutive pixels?
For example, in a QwtPlot subclass constructor:
curve
->setPen
(QPen(Qt
::green,
1));
curve->attach(this);
setCanvasBackground
( QColor(Qt
::black) );
enableAxis
(QwtPlot::xBottom,
false);
setMargin(0);
setFixedSize(800, 600);
QwtPlotCurve *curve = new QwtPlotCurve("curve");
curve->setPen(QPen(Qt::green, 1));
curve->attach(this);
setCanvasBackground( QColor(Qt::black) );
curve->setData(qwtData);
enableAxis(QwtPlot::xBottom, false);
enableAxis(QwtPlot::yLeft, false);
setMargin(0);
setFixedSize(800, 600);
To copy to clipboard, switch view to plain text mode
If qwtData has 400 values, they don't occupy half of the plot, instead they are stretched to fit the whole 800 pixels.
I'd be very thankful for any clues.
catto
Bookmarks