1 Attachment(s)
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.
Attachment 12176
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
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
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!