Menu

How to create a discontinue trace

Help
Anonymous
2014-06-11
2014-06-18
  • Anonymous

    Anonymous - 2014-06-11

    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?

     
  • Achim Westermann

    Hi,

    several solutions.

    1. Use Trace2DReplacing

    See the javadoc of that class. This works, if you are using the exact x values again.

    1. 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 ;-)

     
  • Camilo

    Camilo - 2014-06-18

    Great help!!!

    Thanks Achim

    addPoint(Double.NaN,Double.NaN);

    This removed completely the line.

    :)

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB