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 Updated to NodeBB v4.3 + New Features

Plotting Graph in Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 580 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.
  • Jai_BalajJ Offline
    Jai_BalajJ Offline
    Jai_Balaj
    wrote on 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);

    RatzzR 1 Reply Last reply
    0
    • Jai_BalajJ Jai_Balaj

      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);

      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on 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

      • Login

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