Originally Posted by
alex_sh
renderCanvas() requires a scale map which is rather confusing to me.
If the data of your spectrogram is in the range 100-2000 on the bottom axis and 10-20 on the left axis and you want to render to a 500x500 image:
maps
[QwtPlot::xBottom].
setPaintInterval( 0,
500 );
maps
[QwtPlot::xBottom].
setScaleInterval( 100,
200 );
maps
[QwtPlot::yLeft].
setPaintInterval( 0,
500 );
maps
[QwtPlot::yLeft].
setScaleInterval( 20,
10 );
QwtScaleMap maps[4];
maps[QwtPlot::xBottom].setPaintInterval( 0, 500 );
maps[QwtPlot::xBottom].setScaleInterval( 100, 200 );
maps[QwtPlot::yLeft].setPaintInterval( 0, 500 );
maps[QwtPlot::yLeft].setScaleInterval( 20, 10 );
To copy to clipboard, switch view to plain text mode
Note that paint device coordinates are increasing from top to bottom, while y-scales usually have the smaller value at the bottom.
HTH,
Uwe
Bookmarks