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. Plotting Graph in Qt
Forum Update on Monday, May 27th 2025

Plotting Graph in Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 562 Views
  • 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.
  • J Offline
    J Offline
    Jai_Balaj
    wrote on 27 May 2016, 02:54 last edited by A Former User
    #1

    How to plot graph in real time by asking inputs to user, and how to input x[] and y[] set values before calling setData(x,y).

    int x1 = ui->x1->text().toInt();
    int y1 = ui->y1->text().toInt();
    int x2 = ui->x2->text().toInt();
    int y2 = ui->y2->text().toInt();

    what I need to make to join these 2 points i.e p1(x1,y1) and p2(x2,y2)

    then I can call the function
    ui->customPlot->addGraph();
    ui->customPlot->graph(0)->setData(x, y);

    R 1 Reply Last reply 27 May 2016, 04:58
    0
    • J Jai_Balaj
      27 May 2016, 02:54

      How to plot graph in real time by asking inputs to user, and how to input x[] and y[] set values before calling setData(x,y).

      int x1 = ui->x1->text().toInt();
      int y1 = ui->y1->text().toInt();
      int x2 = ui->x2->text().toInt();
      int y2 = ui->y2->text().toInt();

      what I need to make to join these 2 points i.e p1(x1,y1) and p2(x2,y2)

      then I can call the function
      ui->customPlot->addGraph();
      ui->customPlot->graph(0)->setData(x, y);

      R Offline
      R Offline
      Ratzz
      wrote on 27 May 2016, 04:58 last edited by
      #2

      @Jai_Balaj
      Not tried, Just a hint may be addData ? http://www.qcustomplot.com/index.php/support/forum/66

      --Alles ist gut.

      1 Reply Last reply
      2

      1/2

      27 May 2016, 02:54

      • Login

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