I am using Trace2DLtd, and I have 300 datapoints per trace, as the application is real time, once it reaches x = 300, I start writing back again at x = 0, but when going back from 300 to 0 a line crosses the graph and I haven’t being able to create a discontinuity or something similar to avoid having that line across the graph. How can this be done without erasing the whole dataset?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
See the javadoc of that class. This works, if you are using the exact x values again.
Use discontinuation
Increase the capacity of the Trace2DLtd to 301 and add as 301st value a point with Double.NaN as x and y value. This causes a discontinuation after 300st point. Then you can start over with x = 0 or x = 1.
HTH,
Achim
P.S.: Info shared to the public. Thank you ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using Trace2DLtd, and I have 300 datapoints per trace, as the application is real time, once it reaches x = 300, I start writing back again at x = 0, but when going back from 300 to 0 a line crosses the graph and I haven’t being able to create a discontinuity or something similar to avoid having that line across the graph. How can this be done without erasing the whole dataset?
Hi,
several solutions.
See the javadoc of that class. This works, if you are using the exact x values again.
Increase the capacity of the Trace2DLtd to 301 and add as 301st value a point with Double.NaN as x and y value. This causes a discontinuation after 300st point. Then you can start over with x = 0 or x = 1.
HTH,
Achim
P.S.: Info shared to the public. Thank you ;-)
Great help!!!
Thanks Achim
addPoint(Double.NaN,Double.NaN);
This removed completely the line.
:)