Real-Time Graphing

Hello all .

I’m still kind of new to Ruby and trying to graph data in real-time but
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
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 =

graph.type = “line”

xvalues =

yvalyes =

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 )




On Tue, 21 Mar 2006, David I. wrote:



what os? gnuplot can easily do this…


Oh, sorry … forgot to mention the OS is Windows XP Pro. I went to
Sourceforge to grab Gnuplot but there weren’t any files listed other
the manual:

Do you have a link to the full code w/ examples?


sender: “David I.” date: “Tue, Mar 21, 2006 at 12:59:32AM +0900” <<<EOQ
Hello all .

I think GraphViz is what you’re looking for :wink:
the tool:
the ruby module:

never used the ruby module yet, as I am pretty new to Ruby (< 30 days).

I have used GraphViz however, and is a really cool piece of software :slight_smile:
check out the gallery:

Good luck,

I had tried GraphViz in the past and couldn’t get it to work. I
the Windows binary from GraphViz’s site then installed the Ruby module.
Running the samples output (what appears to be) byte data which I
to a file with the extension ‘png’. When I try to view the output,
renders it. Excluding that, I was hoping to find something more in-line
with (only for Ruby
instead of C#).


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs