You can overload QwtLinearColorMap::rgb() and add some special handling for 0.0 before calling the base class.
But note that QwtLinearColorMap::rgb() already has this code made for gaps in a spectrogram:
if ( qIsNaN(value) )
return qRgba(0, 0, 0, 0);
if ( qIsNaN(value) )
return qRgba(0, 0, 0, 0);
To copy to clipboard, switch view to plain text mode
So when using NaN instad of 0.0 you would have transparent pixels and you would see the background color of the canvas ( could be gray if you want to ).
Uwe
Bookmarks