How to draw a distance map with Ruby

M

Marc Hoeppner

Hi!

I have been scratching my head over this and thought someone here can
help me out:

I have a number of data points that I want to plot in a 2 or 3d space
based on pairwise distances. I do have the distances, but frankly no
idea of how to do the mapping/plotting.

I am not necessarily looking for a complete solution - but would be
grateful if someone could point me in the right direction (tutorials or
which methods to use in ruby..)

Cheers,

Marc
 
G

G.Durga Prasad

Hi!

I have been scratching my head over this and thought someone here can
help me out:

I have a number of data points that I want to plot in a 2 or 3d space
based on pairwise distances. I do have the distances, but frankly no
idea of how to do the mapping/plotting.

I am not necessarily looking for a complete solution - but would be
grateful if someone could point me in the right direction (tutorials or
which methods to use in ruby..)

Cheers,

Marc

I am just examining RubyDCL (ruby-dcl-1.5.3). May be you will find
something useful there.

Prasad
 
A

Axel Etzold

-------- Original-Nachricht --------
Datum: Tue, 3 Jun 2008 01:23:08 +0900
Von: "G.Durga Prasad" <[email protected]>
An: (e-mail address removed)
Betreff: Re: How to draw a distance map with Ruby

I am just examining RubyDCL (ruby-dcl-1.5.3). May be you will find
something useful there.

Prasad

Dear Marc,

maybe you can use RGL in some way:

http://rgl.rubyforge.org/rgl/index.html

There is some care taken of the distance in the second example module_graph.jpg,
not yet what you asked for, but there's a description language, 'dot', associated to the
project, which might be tweakable into what you asked for.

Best regards,

Axel
 
J

joseph collins

I wonder if I stop using perl and start using Ruby.
1-Can ruby programs create Guis much like C# and VB.NET?
2-Can ruby programs be turned into .exe files if needed?
3-Does Ruby support regexp like Perl does?
4-If Ruby as good as perl is when processing text?
5-Does ruby have anything like associative arrays?

Feedback needed

Joe
Date: Tue, 3 Jun 2008 07:20:34 +0900
From: (e-mail address removed)
Subject: Re: How to draw a distance map with Ruby
To: (e-mail address removed)
=20
=20
-------- Original-Nachricht --------
=20
Dear Marc,
=20
maybe you can use RGL in some way:
=20
http://rgl.rubyforge.org/rgl/index.html
=20
There is some care taken of the distance in the second example module_gra= ph.jpg,=20
not yet what you asked for, but there's a description language, 'dot', as= sociated to the
project, which might be tweakable into what you asked for.
=20
Best regards,
=20
Axel=20
=20
=20
--=20
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=3Dsv_ext_mf@gmx
=20

_________________________________________________________________
Change the world with e-mail. Join the i=92m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=3DEML_WL_ChangeWor=
ld=
 
T

Todd Benson

I wonder if I stop using perl and start using Ruby.
1-Can ruby programs create Guis much like C# and VB.NET?

That's a vague question, but the answer: probably not the same kind of
GUI API you're thinking of.
2-Can ruby programs be turned into .exe files if needed?

Yes. But that's Windows, so your question misses a large user base.
3-Does Ruby support regexp like Perl does?

I'm going to go with Yes on this one. There are differences between
releases, though (look behind capabilities, etc.)
4-If Ruby as good as perl is when processing text?

Depends on the programmer.
5-Does ruby have anything like associative arrays?

This last question will have many ruby programmers silently biting
their teeth. You may not have done your homework. For Giggles and
Sits...

h = {}
Feedback needed

Joe

A bunch of articles that spear, roast, and slice these questions --
complete with gravy -- frequent a simple google search. Funny, I
didn't think I would ever say that.

hth,
Todd
 
J

joseph collins

I wonder if I should stop using perl and start using Ruby. I need inputfrom=
the Ruby programmers:1-Can ruby programs create Guis much like C# and VB.N=
ET?2-Can ruby programs be turned into .exe files if needed?3-Does Ruby supp=
ort regexp like Perl does?4-If Ruby as good as perl is when processing text=
?5-Does ruby have anything like associative arrays? Feedback needed - thank=
s! Joe
_________________________________________________________________
Change the world with e-mail. Join the i=92m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=3DEML_WL_ChangeWor=
ld=
 
J

James Britt

joseph said:
I wonder if I should stop using perl and start using Ruby. I need inputfrom the Ruby programmers:

1-Can ruby programs create Guis much like C# and VB.NET?

Yes. I suggest using JRuby + Monkeybars for maximum power + most ease
of use.

But there's also Fx, Tk, a few other options.


2-Can ruby programs be turned into .exe files if needed?

Um, depends on what you mean.

There is rubyscript2exe that bundles up your code + a Ruby interpreter
in a self-executing file, and using JRuby + the rawr lib you can easily
create distributable executable files for distribution, but these are
not actually turning Ruby code into native code.

3-Does Ruby support regexp like Perl does?

Yes, though not exactly as Perl does. Some small syntax variance.

4-If Ruby as good as perl is when processing text?

I think so. Don't see why not, but I haven't used perl in 4 years.


5-Does ruby have anything like associative arrays?


yes. We call them hashes.
 
M

M. Edward (Ed) Borasky

joseph said:
I wonder if I should stop using perl and start using Ruby.

Probably not. Perl has certain advantages, not the least of which is the
fact that you know it.
I need input from the Ruby programmers:


1-Can ruby programs create Guis much like C# and VB.NET?

There are quite a few GUI toolkits for Ruby. A Frequently Asked Question
here is "which one is the best?" And the answer is usually "it depends."


2-Can ruby programs be turned into .exe files if needed?

Probably not as easily as Perl programs can.


3-Does Ruby support regexp like Perl does?

Yes.


4-If Ruby as good as perl is when processing text?

Yes.
5-Does ruby have anything like associative arrays?

Yes.
Feedback needed - thanks! Joe
_________________________________________________________________
Change the world with e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld

Just out of curiosity, are you at Microsoft? There's something called
IronRuby from Microsoft that runs Ruby on the CLR -- it might be just
what you're looking for. As far as I know, there's no "IronPerl",
although there is an IronPython, to throw another language into the mix. :)
 
A

Axel Etzold

-------- Original-Nachricht --------
Datum: Tue, 3 Jun 2008 07:54:57 +0900
Von: joseph collins <[email protected]>
An: (e-mail address removed)
Betreff: Re: How to draw a distance map with Ruby
I wonder if I stop using perl and start using Ruby.
1-Can ruby programs create Guis much like C# and VB.NET?
2-Can ruby programs be turned into .exe files if needed?
3-Does Ruby support regexp like Perl does?
4-If Ruby as good as perl is when processing text?
5-Does ruby have anything like associative arrays?

Feedback needed

Joe

Joe,

when posting to this list, please don't hijack other people's threads...

Best regards,

Axel
 
E

Eivind Eklund

4-If Ruby as good as perl is when processing text?

More or less. The Perl convention of having empty string and 0 mean
false and the automatic conversion between numbers and strings
sometimes makes text processing in Perl a bit more convenient; on the
other hand, the convention in Ruby makes most other things more
convenient.

Eivind.
 
R

Robert Dober

Probably not. Perl has certain advantages, not the least of which is the
fact that you know it.
Not stopping perl is ok; not starting Ruby might be a missed
opportunity though, well of course only you can decide about your
available time.
<skip>
Cheers
Robert
 
J

joseph collins

Thanks - that is what I wanted to hear....I have used perl heavily and it h=
as served me well.
I will look further into Ruby.

Joe
Date: Tue, 3 Jun 2008 10:10:16 +0900
From: (e-mail address removed)
Subject: Re: Ruby or Perl?
To: (e-mail address removed)
=20
from the Ruby programmers:
1-Can ruby programs create Guis much like C# and VB.NET?
Yes. I suggest using JRuby + Monkeybars for maximum power + most ease of= use.
But there's also Fx, Tk, a few other options.
=20
2-Can ruby programs be turned into .exe files if needed?
Um, depends on what you mean.
There is rubyscript2exe that bundles up your code + a Ruby interpreter=20
in a self-executing file, and using JRuby + the rawr lib you can easily=20
create distributable executable files for distribution, but these are=20
not actually turning Ruby code into native code.
=20
3-Does Ruby support regexp like Perl does?
Yes, though not exactly as Perl does. Some small syntax variance.
=20
4-If Ruby as good as perl is when processing text?
I think so. Don't see why not, but I haven't used perl in 4 years.
=20
=20
5-Does ruby have anything like associative arrays?
yes. We call them hashes.
=20
--=20
James Britt
=20
"I can see them saying something like 'OMG Three Wizards Awesome'"
- billinboston, on reddit.com
=20

_________________________________________________________________
Search that pays you back! Introducing Live Search cashback.
http://search.live.com/cashback/?&pkw=3Dform=3DMIJAAF/publ=3DHMTGL/crea=3Ds=
rchpaysyouback=
 

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,776
Messages
2,569,603
Members
45,185
Latest member
GluceaReviews

Latest Threads

Top