To avoid, that tick labels close to the borders extend the canvas you have to set:
plot->plotLayout()->setAlignCanvasToScales(true);
plot->plotLayout()->setAlignCanvasToScales(true);
To copy to clipboard, switch view to plain text mode
Next you have to decide if you want to use auto scaling or not. If not you can assign the axes scales manually.
plot
->setAxisScale
( QwtPlot::xBottom, ...
);
plot
->setAxisScale
( QwtPlot::yLeft, ...
);
...
plot->setAxisScale( QwtPlot::xBottom, ... );
plot->setAxisScale( QwtPlot::yLeft, ... );
...
To copy to clipboard, switch view to plain text mode
If you want to have autoscaling, but you want to exclude your spectrogram from participating:
spectrogram
->setItemAtribute
( QwtPlotItem::AutoScale,
false );
spectrogram->setItemAtribute( QwtPlotItem::AutoScale, false );
To copy to clipboard, switch view to plain text mode
Or if you want to have autoscaling for your spectrogram , but you don't want the autoscaler to align the borders of the scales:
plot
->axisScaleEngine
( QwtPlot::xBottom )->setAttribute
(plot
->axisScaleEngine
( QwtPlot::yLeft )->setAttribute
(...
plot->axisScaleEngine( QwtPlot::xBottom )->setAttribute(
QwtScaleEngine::Floating, true );
plot->axisScaleEngine( QwtPlot::yLeft )->setAttribute(
QwtScaleEngine::Floating, true );
...
To copy to clipboard, switch view to plain text mode
HTH,
Uwe
Bookmarks