XY line graph with an expanding domain and range (strip chart)


I am attempting to create a simple XY line graph that I can add points
to during runtime, so that each time I add a point to it the display
will update.  I have written a few simple programs to use visAD and I
have read through the visAD tutorial and... but I cannot find a clean
way to do this...

All I would like to do is have time on the x-axis, and plot another
quantity on the y-axis...and efficiently update the display each time I
add a point.

is this do-able?  it seems like i would need a function
(time->quantity), with an Integer1DSet for time.  but the Integer1DSet
would have to grow by 1 and so would the container that holds the
quantity values, so I would have to create a new Integer1DSet and copy
over the array to a new one 1 size bigger everytime I want to add a
point?  this is the only way I can think of doing it with my beginner
visAD knowledge... there has to be a better way?  (maybe doing something
with an animation?)

Eventually, I would like to have an XY line graph that always contains a
constant number of points, and then it starts scrolling when you add
points that don't fit on the graph.  for example, the graph could start
out with the time scale from 0 to 499 ... with no points plotted... then
when you add point 500 the graph would shift and now be showing points 1
through 500... then when point 1000 is added points 501 to 1000 are
showing... then you can scroll through the points after all the data has
been generated?

if this is not do-able in visAD or if it would be better to do this with
a different library, does anyone know of another library that would be
better suited for this?


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: