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

Qt Code:
  1.  
  2. QwtLinearColorMap colorMap(Qt::white, Qt::black);
  3. spectrogram->setColorMap(colorMap);
  4. spectrogram->setData(*spectrogramData);
  5.  
  6. QwtDoubleRect r = spectrogramData->boundingRect();
  7. qwtPlot->setAxisScale( QwtPlot::yLeft , 0, 5000, 1000);
  8. qwtPlot->setAxisScale( QwtPlot::xBottom , r.left(), r.right(), 0.1);
  9.  
  10. spectrogram->attach(qwtPlot);
  11. qwtPlot->repaint();
To copy to clipboard, switch view to plain text mode