Real-Time Graphing

D

David Ishmael

------=_NextPart_000_00C3_01C64C0D.5833E680
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

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


------=_NextPart_000_00C3_01C64C0D.5833E680--
 
A

ara.t.howard

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

what os? gnuplot can easily do this...

-a
 
D

David Ishmael

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


-----Original Message-----
From: (e-mail address removed) [mailto:[email protected]]
Sent: Monday, March 20, 2006 11:58 AM
To: ruby-talk ML
Subject: Re: Real-Time Graphing

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

what os? gnuplot can easily do this...

-a
 
A

Alexandru E. Ungur

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
 
D

David Ishmael

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

-----Original Message-----
From: Alexandru E. Ungur [mailto:[email protected]]
Sent: Wednesday, March 22, 2006 6:26 AM
To: ruby-talk ML
Subject: Re: Real-Time Graphing
<<<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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top