x/y are values from the scales. How your values are related to the scale coordinates is something I can't tell you.
The implementation of "value()" you have posted will be way to slow. It will be called for each pixel of the canvas ( when there is no pixelHint() ). You can't have an operation like indexOf() there.
Also indexOf() will fail for almost all values as the position of the pixels usually never meet the position, where you have a value. So you usually have a to do something called resampling. Mostly it is a nearest neighbor algorithm, but you might use some sort of interpolation as well.
F.e. QwtMatrixRasterData offers nearest neighbor and bilinear interpolation.
Uwe
PS: If all you want to do is to map values at a specific position to a colored dot QwtPlotSpectroCurve might be what you are looking for.
Bookmarks