Hello,

Our application sometimes triggers a condition when the Z-interval set for QwtMatrixRasterData is invalid (contains NaNs, for example) because the data itself is invalid. The result is that QwtPlotSpectrogram draws unfilled image from uninitialized memory.

This seems to happen in QwtPlotSpectrogram::renderImage(), near
Qt Code:
  1. if ( !intensityRange.isValid() )
  2. return image;
To copy to clipboard, switch view to plain text mode 

If I modify it to the following, a proper transparent image is returned and the random-colored blocks go away.
Qt Code:
  1. if ( !intensityRange.isValid() ) {
  2. image.fill(qRgba(0, 0, 0, 0));
  3. return image;
  4. }
To copy to clipboard, switch view to plain text mode 

To reproduce, just change
setInterval( Qt::ZAxis, QwtInterval(1.0, 6.0) );
to
setInterval( Qt::ZAxis, QwtInterval(1.0, -1.0) );
in the rasterview example.

Thanks!