Forum: Ruby Real-Time Graphing

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2007c0c37cb176dc3d601cf5724fea54?d=identicon&s=25 David Ishmael (Guest)
on 2006-03-20 16:59
(Received via mailing list)
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
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 unknown (Guest)
on 2006-03-20 17:58
(Received via mailing list)
On Tue, 21 Mar 2006, David Ishmael wrote:

>
>
> graph.draw
>
> end

what os?  gnuplot can easily do this...

-a
2007c0c37cb176dc3d601cf5724fea54?d=identicon&s=25 David Ishmael (Guest)
on 2006-03-20 18:03
(Received via mailing list)
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
than
the manual:

http://sourceforge.net/project/showfiles.php?group_id=54673

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

-Dave
245cfab887781bdf3f53178b794c42dc?d=identicon&s=25 Alexandru E. Ungur (Guest)
on 2006-03-22 12:25
(Received via mailing list)
>>> sender: "David Ishmael" date: "Tue, Mar 21, 2006 at 12:59:32AM +0900" <<<EOQ
> Hello all .
Hi,

I think GraphViz is what you're looking for ;)
the tool: http://www.graphviz.org/
the ruby module: http://raa.ruby-lang.org/project/ruby-graphviz/

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

I have used GraphViz however, and is a really cool piece of software :)
check out the gallery: http://www.graphviz.org/Gallery.php


Good luck,
Alex
2007c0c37cb176dc3d601cf5724fea54?d=identicon&s=25 David Ishmael (Guest)
on 2006-03-22 14:21
(Received via mailing list)
I had tried GraphViz in the past and couldn't get it to work.  I
installed
the Windows binary from GraphViz's site then installed the Ruby module.
Running the samples output (what appears to be) byte data which I
redirect
to a file with the extension 'png'.  When I try to view the output,
nothing
renders it.  Excluding that, I was hoping to find something more in-line
with http://zedgraph.org/wiki/index.php?title=Main_Page (only for Ruby
instead of C#).

-Dave
This topic is locked and can not be replied to.