dishmael
3/20/2006 4:00:00 PM
Hello all .
I'm still kind of new to Ruby and trying to graph data in real-time but I
can't seem to find a suitable graphing engine. I've sniffed around using my
friend Google, but I didn't find anything concrete. Has anyone out there
done a GUI graph that updates in real-time (something simple like a line
chart)? Here's some pseudocode to help get my point across:
graph = SomeGraphEngine.new
graph.type = "line"
xvalues = Array.new
yvalyes = Array.new
for num in ( 0 .. 36 )
xvalues << Float( num * 10.0 + 50 )
yvalues << Float( Math.sin( num * Math.pi / 15.0 ) * 16.0 )
graph.coords( xvalues, yvalues )
graph.draw
end
-Dave