QwtLinearColorMap not working for a [-26, 0] range data set?
I am trying to display a spectrogram with values ranging from -26.299 to 0 (it's the log of a normalized spectrogram). With the code below, which is more or less straight out of the spectrogram example, I only get a completely white plot. If I flip the sign of all the data (so that it's [0,26.299]) there is an accurate display (but with the colors flipped, of course).
I suppose I could just shift all the values to be positive, but I'd rather not do that if I don't have to. Is there a way to get QwtLinearColorMap to work well with this data range?
Thanks,
Adam
Code:
spectrogram->setColorMap(colorMap);
spectrogram->setData(*spectrogramData);
QwtDoubleRect r = spectrogramData->boundingRect();
qwtPlot
->setAxisScale
( QwtPlot::yLeft ,
0,
5000,
1000);
qwtPlot
->setAxisScale
( QwtPlot::xBottom , r.
left(), r.
right(),
0.1);
qwtPlot->repaint();
Re: QwtLinearColorMap not working for a [-26, 0] range data set?
What about flipping the colors of the color map too: black -> white instead of white -> black ?
Uwe
Re: QwtLinearColorMap not working for a [-26, 0] range data set?
When I do that the spectrogram just displays all black instead of all white.