Results 1 to 4 of 4

Thread: Disconnect a Point in a Curve on a Plot

  1. #1
    Join Date
    Sep 2015
    Location
    Ontario, Canada
    Posts
    28
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Disconnect a Point in a Curve on a Plot

    I'm currently plotting live data fetched from a server that's been stored in an array in a QwtPlot. When I don't have data that's been fetched from the server in a spot in the array I currently just return a value that is NaN in order to not plot anything at that point so as to not display data I don't have.

    However, my problem is that when I have a point that's valid which neighbors a point that's invalid (I.e. NaN) the plot draws a line that extends infinitely upwards to connect the two of them, still seemingly thinking there's a point associated with NaN. Is there a way I can still use a line to draw my plot and connect all my points, but have any valid point that's connected to an invalid point not draw a line? Or should i go about this another way?

    I've attached a screenshot of my plot for clarification.

    Thanks for any help.

    PlotExample.png

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

    Default Re: Disconnect a Point in a Curve on a Plot

    Assuming you have such an invalid point at position n: do you want to have a connecting line between the points n-1 and n+1 or is the curve supposed to stop at n-1 restarting ar n+1 ?
    Do you have symbols ?

    Uwe

  3. #3
    Join Date
    Sep 2015
    Location
    Ontario, Canada
    Posts
    28
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Disconnect a Point in a Curve on a Plot

    Having the curve stop at n - 1, and restart at n+1 would work best. Also no I don't have symbols, would they help?

    Thanks,

    TEAmerc

  4. #4
    Join Date
    Sep 2015
    Location
    Ontario, Canada
    Posts
    28
    Thanks
    12
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Disconnect a Point in a Curve on a Plot

    So I updated my library and found that this functionality that I wanted does occur ever since Qwt 6.1.3 so my issue's been resolved.

    Thanks!

Similar Threads

  1. Get any point's Coordinates in a Curve
    By Schoumi in forum Qwt
    Replies: 8
    Last Post: 7th December 2011, 08:13
  2. Replies: 3
    Last Post: 21st June 2011, 20:37
  3. Replies: 2
    Last Post: 5th May 2011, 07:53
  4. Replies: 2
    Last Post: 28th April 2011, 09:42
  5. display a plot point by point
    By oswalidos in forum Newbie
    Replies: 32
    Last Post: 13th March 2009, 16:37

Tags for this Thread

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.