# Thread: Disconnect a Point in a Curve on a Plot

1. Novice
Join Date
Sep 2015
Location
Posts
28
Thanks
12
Thanked 1 Time in 1 Post
Qt products
Platforms

## 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. Uwe
Expert
Join Date
Feb 2006
Location
Munich, Germany
Posts
3,277
Thanked 871 Times in 819 Posts
Qt products
Platforms

## 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. Novice
Join Date
Sep 2015
Location
Posts
28
Thanks
12
Thanked 1 Time in 1 Post
Qt products
Platforms

## 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. Novice
Join Date
Sep 2015
Location
Posts
28
Thanks
12
Thanked 1 Time in 1 Post
Qt products
Platforms

## 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!

#### 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.