Results 1 to 5 of 5

Thread: in qwt plot selected region need to find max graph line point

  1. #1
    Join Date
    Mar 2016
    Posts
    4
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Question in qwt plot selected region need to find max graph line point

    Hi ,all i generated plot between x-coordinates and intensities,now my problem is i need to identify on the curve selected region need to find the max graph line point ,for better understand like http://postimg.org/image/an4lh1h8p/ ,suggestions please

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: in qwt plot selected region need to find max graph line point

    Well the peaks can be found from analysing your samples only. What extra information do you need from its visual representation ( = the plot ) ?

    Uwe

  3. #3
    Join Date
    Mar 2016
    Posts
    4
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Question Re: in qwt plot selected region need to find max graph line point

    when ever we select one region on graph http://postimg.org/image/an4lh1h8p/ that time only with in the region points only need to find max point (this part i have idea) ,my problem is how will start curve data comparing from rubberband start region to rubberband end region .please suggest similar examples or posts,thank you.
    Last edited by chandrasekhar.embedded; 7th March 2016 at 03:16. Reason: updated contents

  4. #4
    Join Date
    Jul 2015
    Posts
    87
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: in qwt plot selected region need to find max graph line point

    Just an idea:
    Your curve data and your rubberband can both transformed into a QPolygonF.
    QPolygon::intersected returns a QPolgonF with intersected data of curve.
    Iterate of that to find max value.

  5. #5
    Join Date
    Mar 2016
    Posts
    4
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: in qwt plot selected region need to find max graph line point

    thankyou ,now with this am able to select region and find max point in the selected region but some times getiing exception http://postimg.org/image/5divnym4l/ ,left side selected many regions worked fine but right side selected region giving exception ASSERT failure in QVector<T>:perator[]: "index out of range", file ..\..\..\Qt\Qt5.5.0\5.5\mingw492_32\include/QtCore/qvector.h, line 397
    Invalid parameter passed to C runtime function.
    Invalid parameter passed to C runtime function.
    How to solve this exception ,suggestions please.
    connect(rectPicker, SIGNAL(selected( QRectF)),this,SLOT( click_on_graph(QRectF)));


    void Mainwindow::click_on_graph( QRectF a)
    {
    qDebug()<<"list\n"<<a;
    long int start,end,i;double maxvalue=0;
    start=a.left();
    end=a.right();
    qDebug()<<"a.left="<<start<<"a.right="<<end;
    for(int i = start; i < end; i++) {
    double intensity = curve->sample(i).y();
    qDebug()<<"curve samples="<<curve->sample(i).y();
    if (intensity > maxvalue)
    maxvalue = intensity;
    }
    qDebug()<<"maxintensity="<<maxvalue;

    }

Similar Threads

  1. Qt5 eglfs QWT6.1 Empty Plot region
    By shriramrs31 in forum Qt for Embedded and Mobile
    Replies: 7
    Last Post: 24th October 2013, 11:19
  2. Replies: 9
    Last Post: 14th February 2012, 19:35
  3. display a plot point by point
    By oswalidos in forum Newbie
    Replies: 32
    Last Post: 13th March 2009, 15:37
  4. Zooming a selected region on QCanvasView
    By luffy27 in forum Qt Programming
    Replies: 10
    Last Post: 5th October 2007, 10:30
  5. Zooming a paricular selected region
    By Kapil in forum Newbie
    Replies: 8
    Last Post: 9th May 2006, 14:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.