Comparison of GLs for plotting (x,y,z) pts?

Hello everyone,

I need to use Dragon NaturallySpeaking on Windows 2000 and I haven't
yet gotten a compiler working on this system. Pardon any odd looking
text because my voice dictation software quite often inserts the wrong
word. Just in case you can't tell yet, I am a Ruby newbie and I
apologize for asking rudimentary questions. Please feel free to just
tell me where to go :-). Literally, the ulr would be terrific.

My goal is to have my application plot arrays of (x,y) and possibly
(x,y,z) data points in "real time". I would also like to write text
on the graphs. I would like to ask for a knowledgeable comparison and
contrast of the multitudes of graphic utility libraries out there
capable of doing this seemingly SIMPLE plotting.

=== Please comment on the following ===
Because of all your help, I have had some great successes with the
following:

Tcl and tk - I don't know to draw lines in this library yet and the
windows look slightly different than I expect.

WxRuby - I don't know how to draw lines yet in this library.

spreadsheet-0.2.8.tar using win32ole - I would like to embed Excel in
my Ruby code.

FXRuby - this looks like an excellent possibility however, this looks
a bit more complicated than OpenGL. It looks like I have to draw
everything and I don't know how to easily write text on the graphics I
create. I.e. I believe have to draw the axes.

OpenGL - this looks like an excellent possibility. It looks like I
have to draw everything good and I don't know how to easily write
text. I.e. I believe have to draw the axes.

=== Please comment on the following if you have Windows 2k successes
I have also had limited success with the following libraries ending in
a show of my ignorance with POSIX OSs, cygwin or using compilers on
Windows:
Rmagick - object not loading properly
SVG::Graph - does not generate graphics directly
ROOT - way to comprehensive for now
PGPLOT - POSIX
Narray – POSIX
rgl-0[1].2.1 – POSIX
TkGnuplot-0.1.tar – POSIX
ruby-graphviz_0.2.0.tar – POSIX
gp400win32 - I'm not sure how to call the libraries.

I greatly appreciate all of the assistance and pointers you have been
giving me!

Thank you,

Todd

Todd Gardner wrote:

My goal is to have my application plot arrays of (x,y) and possibly
(x,y,z) data points in "real time". I would also like to write text
on the graphs. I would like to ask for a knowledgeable comparison and
contrast of the multitudes of graphic utility libraries out there
capable of doing this seemingly SIMPLE plotting.

....

WxRuby - I don't know how to draw lines yet in this library.

In WxRuby you could use a Device Context to draw lines, points, fills, ellipses, etc, plus text onto a frame. For a full list of methods available see the WxWidgets docs:

http://www.wxwidgets.org/manuals/2.4.2/wx105.htm#wxdc

I haven't used these classes in detail, so I don't know whether the bindings are complete, but the following simple example worked for me using wxruby-0.3.0 (current release is 0.4.0)

chrz
alex

···

---------------------------

require 'wxruby'

class MyDrawingFrame < Wx::Frame
   def initialize(*args)
     super(*args)
     evt_paint { on_paint }
   end
   def on_paint
     paint do | dc |
       dc.clear
       dc.draw_line( 0, 0, 50, 100)
       dc.draw_line( 50, 100, 100, 75)
       dc.draw_text( 'a label', 52, 102)
     end
   end
end

class MyApp < Wx::App
   def on_init()
     frame = MyDrawingFrame.new(nil, -1, 'Drawing')
     frame.set_client_size( Wx::Size.new(200,200))
     frame.show()
   end
end

MyApp.new().main_loop()

alex fenton <alex@delete.pressure.to> wrote in message news:<6dudnav0xY7PD0jdRVn-gw@eclipse.net.uk>...

Todd Gardner wrote:

> My goal is to have my application plot arrays of (x,y) and possibly
> (x,y,z) data points in "real time". I would also like to write text
> on the graphs. I would like to ask for a knowledgeable comparison and
> contrast of the multitudes of graphic utility libraries out there
> capable of doing this seemingly SIMPLE plotting.

...

> WxRuby - I don't know how to draw lines yet in this library.

In WxRuby you could use a Device Context to draw lines, points, fills,
ellipses, etc, plus text onto a frame. For a full list of methods
available see the WxWidgets docs:

http://www.wxwidgets.org/manuals/2.4.2/wx105.htm#wxdc

I haven't used these classes in detail, so I don't know whether the
bindings are complete, but the following simple example worked for me
using wxruby-0.3.0 (current release is 0.4.0)

chrz
alex

---------------------------

require 'wxruby'

class MyDrawingFrame < Wx::Frame
   def initialize(*args)
     super(*args)
     evt_paint { on_paint }
   end
   def on_paint
     paint do | dc |
       dc.clear
       dc.draw_line( 0, 0, 50, 100)
       dc.draw_line( 50, 100, 100, 75)
       dc.draw_text( 'a label', 52, 102)
     end
   end
end

class MyApp < Wx::App
   def on_init()
     frame = MyDrawingFrame.new(nil, -1, 'Drawing')
     frame.set_client_size( Wx::Size.new(200,200))
     frame.show()
   end
end

MyApp.new().main_loop()

Hello Alex,

While that's pretty easy. Thanks for showing me that!

Todd