Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QCustomPlot - scale every axis individually
Qt 6.11 is out! See what's new in the release blog

QCustomPlot - scale every axis individually

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • kb91K Offline
    kb91K Offline
    kb91
    wrote on last edited by
    #1

    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->setVisible(false);
      ax->setRange(INIT_Y_MIN, INIT_Y_MAX);
      scaleRatios.insert(scaleRatios.begin()+num,1.0);
      connect(ui->customPlot->yAxis, SIGNAL(rangeChanged(QCPRange)), ax, SLOT(setRange(QCPRange)));
      scaleAxes.insert(scaleAxes.begin()+num, ax);
    
      ui->customPlot->addGraph(axisX,ax);
    

    Any suggestions how to solve that?

    Best regards,
    Chris

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved