Well, when the spectrogram item is requested ( by the plot widget ) to draw itself, it iterates over all pixels of the target device ( the widget ). For each pixel it calculates the corresponding scale coordinates (x/y) and requests a value ( QwtRasterData::value() ) for this position. Then it maps the value into a color ( using a QwtColorMap ) and puts it to a QImage. When all pixels are collected the image is painted to the target device.I managed to get just a solid horizontal bar displayed on the spectrogram and have control over where it is drawn in the vertical direction (for step 1), but I still don't think I understand how the raster/ spectrogram plot works, and the way I'm drawing the bar is extremely slow....it takes in the order of 23 seconds to draw a screen with only one bar drawn (no animation even attempted yet).
So your implementation of YourRasterData::value() needs to be pretty fast as it is called often ( width * height ! ). If you needs 23 seconds you are doing something very, very expensive in YourRasterData::value() ( or in your color map, when you have implemented your own ).
Writing a tutorial is one of my priorities, when Qwt 6.0.0 has been done.Uwe, have you ever considered writing a tutorial book on Qwt? I'd buy it.
Uwe
Bookmarks