Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > graphing link list nodes... modules?

Reply
Thread Tools

graphing link list nodes... modules?

 
 
hennessy
Guest
Posts: n/a
 
      06-02-2004
Hi,
I need to put together a PNG or PDF chart using a linked list of
'nodes', and I was wondering if there were any modules that handled this
kind of thing already? That is, if I had a listref of hashrefs like so:

$nodes->[$entry]->{'id'}
$nodes->[$entry]->{'parent_id'}
$nodes->[$entry]->{'name'}
$nodes->[$entry]->{'description'}

I would feed it the LoH and tell it which keys to use as id and
parent id, and it would create graphics representing name & description
and arrows relating the relationships between the LoH nodes, say as
objects in a default layout which could be modified by object calls or
something.

I'm thinking maybe this is too generic a problem, but if anyone
can point me to a module or recipe I'd be terribly grateful...

(oh yes, and perl.com seems down from my end and CPAN didn't have
anything in search that was screamingly obvious)

Cheers!
- Matt

--
"When in doubt, use brute force."
- Ken Thompson
 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      06-02-2004

Quoth http://www.velocityreviews.com/forums/(E-Mail Removed)9.net (hennessy):
> Hi,
> I need to put together a PNG or PDF chart using a linked list of
> 'nodes', and I was wondering if there were any modules that handled this
> kind of thing already? That is, if I had a listref of hashrefs like so:
>
> $nodes->[$entry]->{'id'}
> $nodes->[$entry]->{'parent_id'}
> $nodes->[$entry]->{'name'}
> $nodes->[$entry]->{'description'}
>
> I would feed it the LoH and tell it which keys to use as id and
> parent id, and it would create graphics representing name & description
> and arrows relating the relationships between the LoH nodes, say as
> objects in a default layout which could be modified by object calls or
> something.
>
> I'm thinking maybe this is too generic a problem, but if anyone
> can point me to a module or recipe I'd be terribly grateful...


The module B::Graph uses an external program called 'dot' to generate
its graphs; you may find that useful. It will generate both ps and png
output (despite the manpage claiming it only produces gif).

http://www.research.att.com/sw/tools/graphviz/

Ben

--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased] http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
hennessy
Guest
Posts: n/a
 
      06-02-2004
In article <c9l28f$q1l$(E-Mail Removed)>,
Ben Morrow <(E-Mail Removed)> wrote:
>http://www.research.att.com/sw/tools/graphviz/


PERFECT!

(I think I'll try the GraphViz module though, or one of its children..)

Thanks!
- Matt
--
"When in doubt, use brute force."
- Ken Thompson
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco 15454s and MRTG Graphing Debbie Cisco 1 03-25-2006 07:38 AM
RE: Link Link Link =?Utf-8?B?REw=?= Windows 64bit 0 05-17-2005 12:15 PM
Re: Link Link Link DANGER WILL ROBINSON!!! Kevin Spencer ASP .Net 0 05-17-2005 10:41 AM
Client side dynamic graphing problem Nevets Steprock ASP .Net 2 04-26-2005 03:33 PM
crystal reports does graphing? Jon Davis ASP .Net 1 01-20-2004 04:03 PM



Advertisments