macos graphviz 有没有好的 IDE 或 WYSIWYG 编辑器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/814621/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there any good IDE or WYSIWYG editor for graphviz?
提问by Thanks
Actually I had downloaded an GUI for graphviz (dont remember the site), which said that they had won an Apple Design Award. But that tool really only displays an *.dot file I created. That's it. It's just called "Graphviz"... I guess that there are better tools around for using the Graphviz technology.
实际上我已经为graphviz下载了一个GUI(不记得该网站),上面说他们赢得了Apple Design Award。但该工具实际上只显示我创建的 *.dot 文件。而已。它只是被称为“Graphviz”……我想有更好的工具可以使用 Graphviz 技术。
I tried this one: link text
我试过这个:链接文本
Although they say that they won an Apple Design Award, I really can't see any special GUI there. Very poor interface.
虽然他们说他们获得了苹果设计奖,但我真的看不到那里有什么特别的 GUI。非常差的界面。
回答by Kevin Vermeer
The current version of Graphviz.app does not contain the "external editor" button shown in rampion's screenshotabove - Or the Render/Stop buttons, and it has replaced the "settings" button with "attributes". However, it can be used as described.
Graphviz.app 的当前版本不包含上面rampion 屏幕截图中显示的“外部编辑器”按钮- 或渲染/停止按钮,它已将“设置”按钮替换为“属性”。但是,它可以按描述使用。
I downloaded 'graphviz-2.27.20101110.0545.pkg' from http://graphviz.org/Download_macos.php. Note that there are several places to download various things which call themselves Graphviz:
我从http://graphviz.org/Download_macos.php下载了“graphviz-2.27.20101110.0545.pkg” 。请注意,有几个地方可以下载各种自称为 Graphviz 的东西:
- http://graphviz.org/Download_macos.php
- http://graphviz.org/Download..php
- http://www.pixelglow.com/graphviz/download/
- http://graphviz.org/Download_macos.php
- http://graphviz.org/Download..php
- http://www.pixelglow.com/graphviz/download/
Use the first one, I chose the most recent development snapshot - A glance at the mailing lists (interestand devel) reveal that it's still pretty active, which you wouldn't know from the pixelglow sites that still have "Content coming soon" messages from 2004.
使用第一个,我选择了最新的开发快照 - 看一眼邮件列表(interest和devel)就会发现它仍然非常活跃,你不会从仍然有“内容即将推出”消息的 pixelglow 网站知道这一点从 2004 年开始。
Anyways, when 2.27 is started, it throws up an "Open" dialog. Opening a .dot file will show a graph, but cancelling reduces you to nothing but a menu bar. Don't be dismayed, create a file with the text
无论如何,当 2.27 启动时,它会抛出一个“打开”对话框。打开一个 .dot 文件将显示一个图表,但取消只会让你变成一个菜单栏。不要沮丧,创建一个包含文本的文件
graph graphname {
}
and call it something.dot.
并称之为something.dot。
Open that in Graphviz, and you get a GUI with an empty graph:
在 Graphviz 中打开它,你会得到一个带有空图形的 GUI:
Type in some more text into the file, like this:
在文件中输入更多文本,如下所示:
graph graphname {
a -- b -- c -- d -- a;
a -- c;
b -- d;
}
The Graphviz window automatically updates when you save to show this:
当您保存以显示以下内容时,Graphviz 窗口会自动更新:
There are a plethora of options in the "Attributes" toolbox, but it looks like they want you to edit the source by hand. I kind of expected "Add vertex" and "Add edge" buttons, and the ability to move vertices around, but that's not what it's about, apparently.
“属性”工具箱中有很多选项,但看起来他们希望您手动编辑源。我有点期待“添加顶点”和“添加边缘”按钮,以及移动顶点的能力,但这显然不是它的意思。
So, apparently, the WYSIWYG editor is your favorite text editor on one side of the screen, and Graphviz on the other. As far as an IDE goes, it looks like the best thing available right now is a printout of the documentationfor the DOT format. Not everybody's idea of a WYSIWYG editor or IDE, but it probably works for active users.
因此,显然,所见即所得编辑器是您最喜欢的屏幕一侧的文本编辑器,而另一侧是 Graphviz。就 IDE 而言,目前看来最好的方法是打印输出DOT 格式的文档。并不是每个人都认为 WYSIWYG 编辑器或 IDE,但它可能适用于活跃用户。
回答by rampion
Graphviz.apphas a command to open the current dot file in an external editor. If you use that, it will monitor the file handle for changes, and update the graph after each time you save in the external editor. That's how you can get it to work as a WYSIWYG interface.
Graphviz.app有一个命令可以在外部编辑器中打开当前的点文件。如果使用它,它将监视文件句柄的更改,并在每次保存在外部编辑器中后更新图形。这就是如何让它作为 WYSIWYG 界面工作。
The 'Edit' button's in the upper left hand corner, next to 'Settings'.
“编辑”按钮位于左上角“设置”旁边。
Actually it monitors the file handle continally anyway, so what I do is open the dot file in Graphviz.app, fire up vim and edit the dotfile (with set backupcopy=yes
) and watch the graph update after each :w
.
实际上它无论如何都会持续监视文件句柄,所以我要做的是在 Graphviz.app 中打开点文件,启动 vim 并编辑点文件(使用set backupcopy=yes
)并在每个:w
.
回答by synthesizerpatel
Not exactly what you're asking for - but the potential of the projects I'm going to mention is pretty huge - as a graphviz fan I've been really amazed at what is now possible.
不完全是你所要求的 - 但我要提到的项目的潜力是非常巨大的 - 作为一个 graphviz 粉丝,我对现在的可能性感到非常惊讶。
The short history:
简短的历史:
- http://ushiroad.com/jsviz/- ushiroad cooked up this lil guy. Using the Emscripten project he cross-compiled enough of graphviz to get layout and basic node stuff as a pure javascript app. You have to click the little round-arrow button on the bottom-right of the DOT src frame.
- http://ushiroad.com/jsviz/- ushiroad 设计了这个小家伙。使用 Emscripten 项目,他交叉编译了足够的 graphviz 以获得布局和基本节点内容作为纯 JavaScript 应用程序。您必须单击 DOT src 框架右下角的小圆箭头按钮。
The only down-side (which in no way diminishes the awesomeness of porting graphviz to javascript) is the limitation on what you can do with it. it's basically just dot layout with a couple primary shaped nodes - doesn't support color. etc.
唯一的缺点(这丝毫没有削弱将 graphviz 移植到 javascript 的魅力)是您可以用它做什么的限制。它基本上只是带有几个主要形状节点的点布局 - 不支持颜色。等等。
The author was awesome enough to upload his work to github, https://github.com/gyuque/livizjs
作者太棒了,可以将他的作品上传到 github,https://github.com/gyuque/livizjs
- https://github.com/mdaines/viz.js- looks like it took it to the next level, from the demo pageit looks as though vis.js can do everything the standard build of graphviz can do, but all in your browser.
- https://github.com/mdaines/viz.js- 看起来它更上一层楼,从演示页面看起来vis.js 可以做graphviz 的标准构建可以做的一切,但都在你的浏览器。
So, if you were so inclined - you could pretty easily take one of the lightweight (but pro!) in-browser editors like CodeMirror(it has vi key support) - and rig up a 'render' button like jsviz.
因此,如果您如此倾向 - 您可以很容易地使用一种轻量级(但专业!)浏览器内编辑器,如CodeMirror(它具有 vi 键支持)-并装配一个“渲染”按钮,如 jsviz。
So.. not exactly what you were looking for. But holy moly for the person who spends a little time on this problem - a bounty of web based client-side graphing tools await.
所以.. 不完全是你要找的。但是对于在这个问题上花一点时间的人来说,天哪 - 大量基于 Web 的客户端图形工具等待着您。
回答by synthesizerpatel
The excellent OmniGrafflecan import *.dot files, but sadly I don't think you can round-trip it back and export the edited results as a dot file natively.
出色的OmniGraffle可以导入 *.dot 文件,但遗憾的是,我认为您无法将其返回并将编辑后的结果导出为本地的 dot 文件。
回答by philcolbourn
There was a UI called dotty. I don't remember it being very nice to use.
有一个名为 dotty 的 UI。我不记得它很好用。