简体   繁体   English

图表布局和重新排列

[英]Graph layout and rearrangement

I'm trying to do a semi-automated graph layout program.我正在尝试做一个半自动图形布局程序。 After reading the input, the program should generate a graph (with a specified layout).读取输入后,程序应该生成一个图形(具有指定的布局)。 The tricky part is that the user should be able to choose a subset of the nodes and rearrange those with another algorithm (while saving the rest in their original position).棘手的部分是用户应该能够选择节点的子集并使用另一种算法重新排列它们(同时将 rest 保存在其原始位置)。 I've went through graphviz and while this option is possible it is very limited (using "pin" only with the 'neato' and 'fdp' algorithms... i would prefer my graph to be oriented)我已经通过了graphviz,虽然这个选项是可能的,但它非常有限(仅在'neato'和'fdp'算法中使用“pin”......我希望我的图表是定向的)

another requirement would be the price.. I've seen that yworks can do what i need but its paid for...另一个要求是价格.. 我已经看到 yworks 可以做我需要的,但它是付费的......

at this point I'll take any language I can get thanx在这一点上,我会采用任何我能得到的语言thanx

currently I'm trying out graphsharp but the documentation is very poor目前我正在尝试graphsharp,但文档很差

If you're happy with semi-automated graph layout, then what you might do is the following (which I did in the past):如果您对半自动图形布局感到满意,那么您可能会做以下事情(我过去做过):

  • download yEd (also from yworks)下载yEd (也来自 yworks)
  • save a graph and look at the file: its XML, and the format is not too complex存个图看文件:它的XML,格式也不算太复杂
  • write some code that save your graph into an XML file compatible with yEd编写一些代码,将您的图形保存到与 yEd 兼容的 XML 文件中
  • open your file form yEd, and use built-in layout algorithms从 yEd 打开你的文件,并使用内置的布局算法
  • save again your file from yEd再次从 yEd 保存您的文件

I hope this helps.我希望这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM