Important: Please read the Qt Code of Conduct -

QCustomPlot - scale every axis individually

  • I have developed quite good working scada app.

    I would like to have a feature that every graph is scalled individually.

    I have tried by adding indixidual y axis for every graph, but I found difficulty later to set scale factor.

      QCPAxis *ax =  ui->customPlot->axisRect()->addAxis(QCPAxis::atLeft);
      ax->setRange(INIT_Y_MIN, INIT_Y_MAX);
      connect(ui->customPlot->yAxis, SIGNAL(rangeChanged(QCPRange)), ax, SLOT(setRange(QCPRange)));
      scaleAxes.insert(scaleAxes.begin()+num, ax);

    Any suggestions how to solve that?

    Best regards,

Log in to reply