Hi,
I am plotting some values with a QwtPlotSpectrogram:
plotImage.
fill(QColor(Qt
::white));
map.setPaintInterval(0, 1);
map.setScaleInterval(0, 1);
plotSpectogram.
draw(&painter, map, map,
QRect(QPoint(0,
0), plotSize
));
QPixmap plotImage = QPixmap(plotSize);
plotImage.fill(QColor(Qt::white));
QPainter painter(&plotImage);
QwtScaleMap map;
map.setPaintInterval(0, 1);
map.setScaleInterval(0, 1);
plotSpectogram.draw(&painter, map, map, QRect(QPoint(0, 0), plotSize));
To copy to clipboard, switch view to plain text mode
That works fine. But if if switch the ContourMode on, somehow the contour lines are mirrored vertically (see attached image). contourplot.jpg
I derive QwtRasterData and implemented all the necessary functions.
This looks like the typical coordinate system problem, at which the origin of the spectrum is bottom left, but the origin of the image is top left. Since I guess, the QwtRasterData::value() method is used for both the image and the contour lines, I dont see, what I did wrong. Do I have to modify the QwtScaleMaps somehow? Or is this origin thing only considered inside QwtPlotSpectrogam while plotting the spectrogram, but not while plotting the contour lines?
I am using Qt 4.6 and Qwt 5.2.
Thanks,
Christoph
Bookmarks