Graphviz:如何从 .dot 变成图形? [英] Graphviz: How to go from .dot to a graph?

查看:37
本文介绍了Graphviz:如何从 .dot 变成图形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法弄清楚这一点.我有一个 .dot 文件,根据语法它是有效的.如何使用 graphviz 将其转换为图像?

I can't seem to figure this out. I have a .dot file, which is valid according to the syntax. How do I use graphviz to convert this into an image?

(请注意,我使用的是 Windows,而不是 linux)

(note that I'm on Windows, not linux)

推荐答案

type: dot -Tps filename.dot -o outfile.ps

如果你想使用点渲染器.有像neato和twopi这样的替代品.如果 graphiz 不在您的路径中,请找出它的安装位置并从那里运行它.

If you want to use the dot renderer. There are alternatives like neato and twopi. If graphiz isn't in your path, figure out where it is installed and run it from there.

您可以通过改变 之后的值来更改 输出格式-T 并在 -o 之后选择适当的文件扩展名.

You can change the output format by varying the value after -T and choosing an appropriate filename extension after -o.

如果您使用的是 Windows,请查看已安装的名为 GVEdit 的工具,它会使整个过程稍微简单一些.

If you're using windows, check out the installed tool called GVEdit, it makes the whole process slightly easier.

在名为用户指南"的部分查看 graphviz 站点,了解有关如何使用这些工具的更多详细信息:

Go look at the graphviz site in the section called "User's Guides" for more detail on how to use the tools:

http://www.graphviz.org/documentation/

(例如,有关 dot 命令的输出格式,请参见第 27 页)

(See page 27 for output formatting for the dot command, for instance)

http://www.graphviz.org/pdf/dotguide.pdf

这篇关于Graphviz:如何从 .dot 变成图形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆