undyingking: (Default)
undyingking ([personal profile] undyingking) wrote2007-08-30 04:09 pm
Entry tags:

Graph drawing app?

Do any of you tech-savvy types know of a good free app that generates a graph from a table of connectivity data?

I am a lay person in this area, so it'll have to not require me to gain significant understanding of graph theory just in order to use it[1]. What I want in the simplest version is to be able to feed in a CSV or similar table of A -> B, C -> B, C-> D, etc, and get out a nice network diagram in some straightforward graphical file format. If it's also able to represent direction, strength etc of relationship, that'd be a bonus!


1 I found the CPAN Graph module fairly heavy going in places in this respect, so that gives you an idea of my lowly level of understanding. But I will end up using that to write something myself if there's nothing handier out there.

[identity profile] leathellin.livejournal.com 2007-08-30 03:19 pm (UTC)(link)
I'm going to be mostly useless and say that I think [livejournal.com profile] metame was playing with something and I shall prod him and find out what it was later...

[identity profile] undyingking.livejournal.com 2007-08-30 03:44 pm (UTC)(link)
Thanks, that'd be great!

[identity profile] bibliogirl.livejournal.com 2007-08-30 03:20 pm (UTC)(link)
That module specifically won't do what you want (it won't draw a graph, it'll just let you work with the mathematical structures within in it). I think the problem with most of the network-diagram type stuff is that they probably care about crossovers and we don't...

[identity profile] undyingking.livejournal.com 2007-08-30 03:53 pm (UTC)(link)
Mm, I was going to follow up with this and this for the actual drawing -- they seem fairly straightforward once you've got the
Graph
object. But would be much preferable not to have to!

[identity profile] bibliogirl.livejournal.com 2007-08-30 04:06 pm (UTC)(link)
It's all a bit overkill, isn't it, since that sort of layout will give you a "nice" layout with things ordered to give the fewest crossovers, etc etc. What we need is basically something which will:

a) take points on a (hypothetical) circle representing each character -- no need to draw the circle itself
b) join those points up according to a given matrix (CSV would be fine) -- say +1 -> +5 for strength of relationship, and maybe use -1 -> -5 for a directed relationship
c) et voilà

Unfortunately the last time I got involved in any kind of graphics programming was, um, nineteen years ago?

[identity profile] undyingking.livejournal.com 2007-08-30 04:10 pm (UTC)(link)
I'm sure would make a fun project for someone...

*tries to avoid the notion of foisting it onto his former housemate*

[identity profile] bibliogirl.livejournal.com 2007-08-30 04:12 pm (UTC)(link)
;)

[identity profile] hatmandu.livejournal.com 2007-08-30 04:35 pm (UTC)(link)
Hsve you seen GraphViz? This seems to do exactly what you're after (not sure if it handles strengths or not - probably can, I'm aguessin). Paul Mutton has tools for visualising relationships in Shakespeare, IRC et al that might be relevant, too.

[identity profile] metame.livejournal.com 2007-08-30 07:16 pm (UTC)(link)
Heartily recommend graphviz. It's used in lots of places for visualising RDF and other networky things. Either work direct with the simple dot ASCII format http://www.graphviz.org/cgi-bin/man?dot or convert (XSLT?) to something like basic RDF and visualise through one of the more graphical tools.

The thing I've been using recently is JFreeChart, but that's for doing plots, bar graphs and the like, not network/connection graphs.

[identity profile] undyingking.livejournal.com 2007-08-31 08:42 am (UTC)(link)
We're starting from an XML basis, so XSLT sounds like a good route. Excellent, thanks for recommendation!

[identity profile] e-pepys.livejournal.com 2007-08-30 09:08 pm (UTC)(link)
I've used GraphViz via the Perl interface to draw SQL schema diagrams. I had a few problems, but they were mostly with the Perl side (I even submitted some patches). GraphViz itself seemed pretty good to me and has lots of options for output.

[identity profile] undyingking.livejournal.com 2007-08-31 08:43 am (UTC)(link)
Great, thanks!

[identity profile] undyingking.livejournal.com 2007-08-31 08:41 am (UTC)(link)
seems to do exactly what you're after

Aha, it does indeed, thanks!

Mm, I've seen that Shakespeare thing before, interesting...

[identity profile] rotwang.livejournal.com 2007-08-30 11:34 pm (UTC)(link)
Haven't looked into any graphing packages, but just let me know in which format you want the export from the database!