Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Draw a figure of a graph(data structure)

6 views
Skip to first unread message

weii

unread,
Dec 13, 2009, 2:47:11 AM12/13/09
to
Hi,all.

I need to draw a figure of a graph(data structure).

I can't get the whole graph all at once. Eachtime I get a pair of
points,they indicate an edge and two
vertexes of the graph.

It's easy to store the graph. But I don't know how to get a rational
layout of the graph,so that the figure looks symmetrical and
balanced.

Another difficult problem(to me) is how to reduce cross-lines.

Any suggestion will be highly appreciated. Thanks in advance!

Hans-Bernhard Bröker

unread,
Dec 13, 2009, 6:23:04 AM12/13/09
to
weii wrote:
> It's easy to store the graph. But I don't know how to get a rational
> layout of the graph,so that the figure looks symmetrical and
> balanced.
>
> Another difficult problem(to me) is how to reduce cross-lines.

You've just discovered the problem generally called "graph layout".
There's quite some literature about it, but for starters you'll want to
look into prebuilt tools, like GraphViz

weii

unread,
Dec 13, 2009, 6:44:27 AM12/13/09
to
Thanks very much.

> There's quite some literature about it, but for starters you'll want to
> look into prebuilt tools, like GraphViz
I am a newbie ,but could you please tell me "some literature" ?

Mark Piffer

unread,
Dec 22, 2009, 5:26:53 AM12/22/09
to

For a start, look into:
http://en.wikipedia.org/wiki/DOT_language

If however, you want to write your own graph layout routines (good
luck on that),
you will have to rummage e.g. www.citeseer.com (free) or the ACM
archives (not
free) for academical papers on the foundations. You are trying to
tackle a very
hard problem in computation so expect this to be a journey possibly
without
a destination.


regards,
Mark

0 new messages