Mathematica 图形编辑器?
我有 Mathematica 8,我正在尝试使用 GraphEdit[],但我发现它非常烦人。一方面,我不知道如何使用它的输出来反馈给它自己。
例如,我使用 GraphEdit[] 创建一个简单的图形并返回:
{ -Graphics-, "Graph" -> {1 -> 1,
1 -> 2}, "Coordinates" -> {{196, 694}, {329,
696}}, "VertexLabels" -> {"First Edge", "Second Edge"}}
但是当我尝试以各种方式将此输出反馈给 GraphEdit 时,唯一有效的方法是去掉坐标和顶点标签并传递“Graph ” 值作为唯一参数。其他一切都会显示一个空图表。去掉坐标和顶点标签会使图表对我来说毫无用处。
我意识到 GraphEdit[] 使用的格式与新版本 8 Graph[] 函数不同,并且可能与旧的 Combinatorica 不完全兼容,但我希望输出能够轻松处理以传递回自身!这些文档并不是特别有帮助,并且没有给出任何有关如何传递包含坐标和顶点信息的图形的示例。我是否遗漏了一些明显(或不那么明显)的东西? GraphEdit[]是一个无用的玩具吗?
或者,版本 8 中是否有新功能可以让我编辑图表?我不得不承认 GraphEdit[] 界面有点有限,我想要更好的东西,至少我可以控制优化界面,但它仍然比没有好。
I've got Mathematica 8 and I'm trying to use GraphEdit[] but I am finding it extremely annoying. For one thing, I can't figure out how to use its output to feed back to itself.
For instance, I create a simple graph using GraphEdit[] and get back this:
{ -Graphics-, "Graph" -> {1 -> 1,
1 -> 2}, "Coordinates" -> {{196, 694}, {329,
696}}, "VertexLabels" -> {"First Edge", "Second Edge"}}
But when I try feeding this output back to GraphEdit in various ways, the only thing that works is if I strip off the Coordinates and VertexLabels and pass the "Graph" value as the only parameter. Everything else bring up an empty graph. Stripping off the coordinates and vertex labels renders the graph useless to me.
I realize that GraphEdit[] is using a different format than the new Version 8 Graph[] function, and maybe isn't completely compatible with the old Combinatorica but I would expect the output to be easily massaged to pass back in to itself! The docs aren't particularly helpful and don't give any examples on how to pass a graph that includes coordinate and vertex info. Is there something obvious (or not so obvious) that I am missing? Is GraphEdit[] a useless toy?
Or, is there something new in Version 8 that will allow me to edit graphs? I have to admit that the GraphEdit[] interface is a bit limited and I would like something better that I at least have control optimizing the interface, but it is still better than nothing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Mathematica 版本 8 中,可以通过右键菜单编辑新的 Graph[] 和相关功能。下图就是一个例子。但这仅适用于格式化。如果您确实需要通过 GUI 添加删除顶点,则必须使用 GraphEdit[]。但它不能采用顶点坐标规范。我个人会使用新的 V8 Graph 功能以编程方式完成这一切 - 其中包含很多好东西。
In Mathematica version 8 new Graph[] and related functionality can be edited from the right-click menu. An example is image below. But this is only for the formatting. If you really need to add remove vertices via GUI you have to use GraphEdit[]. It cannot take vertex coordinates specification though. I personally would do it all programmatically with new V8 Graph functionality - there are a lot of goodies packed in it.
这里有 Karl Scherer 和 Ed Pegg jr 的精彩演示,这似乎符合您的要求。
http://demonstrations.wolfram.com/ConstructingAndManipulatedGraphs/
There is a nice demonstration by Karl Scherer and Ed Pegg jr here, which seems to do what you are looking for.
http://demonstrations.wolfram.com/ConstructingAndManipulatingGraphs/