Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Hi all, how to read selected region qwt plot coordinates ??

Hi all, how to read selected region qwt plot coordinates ??

Scheduled Pinned Locked Moved 3rd Party Software
2 Posts 2 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.
  • C Offline
    C Offline
    chandrasekhar.embedded
    wrote on last edited by
    #1

    with the following code ,am able to select region and reading curve data but not getting correct values missing index order of closestpoint ,suggestions please

    picker = new QwtPlotPicker(QwtPlot::xBottom,QwtPlot::yLeft,
    QwtPicker::RectRubberBand,QwtPicker::AlwaysOn, myPlot->canvas());
    QwtPickerDragRectMachine* test = new QwtPickerDragRectMachine();
    test->setState(QwtPickerMachine::RectSelection);
    picker->setStateMachine(test);

    //connect(picker, SIGNAL(selected(const QPolygon)),this,SLOT( click_on_graph(const QPolygon)));
    connect(picker, SIGNAL(selected(QRectF)),this,SLOT( click_on_graph(QRectF)));
    }
    void Mainwindow::click_on_graph(QRectF area)
    {
    int start;
    int width=area.width();
    start = curve->closestPoint(picker->trackerPosition());
    qDebug()<<"index="<<start;
    for(int i=0;i<=(width-1);i++)
    {
    QPointF graphintensity=this->curve->sample(start+(i));
    qDebug()<<"x="<<graphintensity;
    }
    }
    points 274 - 290
    start point 274 and end point 290 in between only need to read
    but here start is 282 and end is 297

    x= QPointF(282.644,4.28082e+09)
    x= QPointF(283.644,4.27951e+09)
    x= QPointF(284.644,4.27911e+09)
    x= QPointF(285.644,4.27898e+09)
    x= QPointF(286.644,4.27898e+09)
    x= QPointF(287.644,4.27898e+09)
    x= QPointF(288.644,4.27891e+09)
    x= QPointF(289.644,4.27885e+09)
    x= QPointF(290.644,4.27885e+09)
    x= QPointF(291.644,4.27891e+09)
    x= QPointF(292.644,4.27891e+09)
    x= QPointF(293.644,4.27878e+09)
    x= QPointF(294.644,4.27885e+09)
    x= QPointF(295.644,4.27885e+09)
    x= QPointF(296.644,4.27885e+09)
    x= QPointF(297.644,4.27891e+09)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should bring this to the QWT folks. They likely be faster to help you with this question.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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