开发者

Graph visual layout [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_Go百科

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

I'm trying to draw graphs (trees), and I looking for a algorithms to layout the graph. Is there a library to do that in c/c++/objective-c? Otherwise, can somebody point to a good resource for that, preferably available online?

The nodes might be of varying sizes.


The igraph library has quite a few layout algorithms for graphs, although you might also find it "overly complex". It's written in C, so you can embed it in C, C++ or Objective C apps.

Specifically, for tree drawing, I would use the Reingold-Tilford layout algorithm. Alternatively, you can go for the Sugiyama layout (see Chapter 5 in this PDF), but I am not aware of any open source C/C++ implementation for that, so you have to roll your own. Incidentally, a Sugiyama-style layout is used by GraphViz when it draws layered graphs.

Disclaimer: I am one of the authors of igraph.


AT&T's Graphviz lays out graphs automatically and does a very good job. Why do you think it's complex? All you have to do is create an input file of the appropriate type. I can't imaging something simpler.

I'd advise you to give it another look - you'll find it's worth it. I'll be surprised if there's a tool that much easier - all you have to do is give the data.


There is also GDToolkit (Graph Drawing Toolkit)

But it doesn't have a free licence, as I see just now :(

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜