Mathematica 图形编辑器?

发布于 2024-12-27 15:08:58 字数 684 浏览 3 评论 0原文

我有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冷情 2025-01-03 15:08:59

在 Mathematica 版本 8 中,可以通过右键菜单编辑新的 Graph[] 和相关功能。下图就是一个例子。但这仅适用于格式化。如果您确实需要通过 GUI 添加删除顶点,则必须使用 GraphEdit[]。但它不能采用顶点坐标规范。我个人会使用新的 V8 Graph 功能以编程方式完成这一切 - 其中包含很多好东西。

CompleteGraph[10]

在此处输入图像描述

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.

CompleteGraph[10]

enter image description here

纵情客 2025-01-03 15:08:59

这里有 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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文