Good afternoon,

I am trying to keep the aspect ratio of my spectrogram when I resize the window, that is, there are circular shapes inside my graph and I'm trying to keep their shape as I change the window, as long as maintaining the top y and bottom x interval limits ( in this case yLeft and xBottom both should go from -1.5 to 1.5).

As suggested in a different thread, I used the QwtPlotRescaler library to maintain the aspect ratio between the lower x axis and left y axis, but it unfortunately only solved half of my problem (literally) because I was able to maintain the shape at the cost of modifying the x axis ( because i yLeft is my reference axis) so that it does not go from -1.5 to 1.5 (I also decided to set QwtPlotRescaler::ExpandBoth in order not to make it look so bad). Is there any way to solve this problem?

My piece of code for the rescaler is:http://doc.qt.io/qt-4.8/
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QwtPlotRescaler *rescaler = new QwtPlotRescaler(ui->myPlot->canvas(), QwtPlot::yLeft, QwtPlotRescaler::Fixed);
rescaler->setExpandingDirection(QwtPlotRescaler::ExpandBoth );
rescaler->setAspectRatio(QwtPlot::xBottom,1.0);
rescaler->setAspectRatio(QwtPlot::yRight,0.0)
}


Thank you,
Jorge