I have a sample data structure like so --

%d = ( a => [b,c,d,], b => [a,d,], c => [b,d,e,], ); and so on...

I would like to create a directed graph (I believe I am using the term correctly) and visualize it such that...

makeGraph('a');
will create a "picture" with 'a' as the origin and arrows to b, c, and d... clicking on, say, 'b' will call makeGraph('b'), and so on.

I believe I can accomplish this with Graphviz family of modules, but there are two problems with Graphviz... one, the output is pretty, how shall I say this politely, not nice. Maybe that can be adjusted with further exploration. But, more than that, it is really a static picture. Ideally I would like one of those springy network visualizations that one sees on Amazon and C|Net, etc. (www.touchgraph.com has a nice WikiBrowser that does something like this, except, in a standalone app... eventually I want this to work in a browser). I realize this would have to be done in something like Java (www.processing.org comes to mind), but perhaps I can do the coding in Perl, and then send off the data to the Java applet.

In any case, I am looking for some starting directions here.

Many thanks,

--

when small people start casting long shadows, it is time to go to bed

In reply to drawing (visualizing) directed graphs by punkish

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.