数学+ GraphPlot +带 EdgeLabels 的 GraphicsGrid

发布于 2024-08-20 11:32:11 字数 248 浏览 5 评论 0原文

我在使用 GraphicsGrid 时遇到了一些非常奇怪的问题。 单独的 PraphPlot:s 看起来不错,但是代码 GraphicsGrid[{{GraphPlot[{{a ->; b,“ab”},{a->; c、 “7”}}]},{GraphPlot[{{a -> b,“5”},{a→ c,“2”}}]}}] 只产生2大块垃圾。如果我删除边缘标签,一切都会按预期进行。我正在使用 Mathematica 7.0.0。

I had some very strange problems with GraphicsGrid.
The individual PraphPlot:s looks nice and ok, but the code
GraphicsGrid[{{GraphPlot[{{a -> b, "ab"}, {a -> c,
"7"}}]}, {GraphPlot[{{a -> b, "5"}, {a -> c, "2"}}]}}]

just produces 2 big clots of garbage. If I remove the edge labels, everything works as expected. I am using Mathematica 7.0.0.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

嘿看小鸭子会跑 2024-08-27 11:32:11

我得到的和你一样,尽管我会称它们为小垃圾。我摆弄了几分钟,得到了这个:

g1 = GraphPlot[{{a -> b, "ab"}, {a -> c, "7"}}];
g2 = GraphPlot[{{a -> b, "5"}, {a -> c, "2"}}];
Grid[{{g1}, {g2}}]

这有点不同,但也许有用。现在得回去工作了。

I got the same as you did, though I'd have called them small bits of rubbish. I fiddled around for a few minutes and got this:

g1 = GraphPlot[{{a -> b, "ab"}, {a -> c, "7"}}];
g2 = GraphPlot[{{a -> b, "5"}, {a -> c, "2"}}];
Grid[{{g1}, {g2}}]

which is a bit different but maybe of some use. Got to get back to work now.

∞琼窗梦回ˉ 2024-08-27 11:32:11

就我个人而言,我讨厌使用 GraphicsGrid,因为我发现它的结果不可预测。正如您对 @High Performance Mark 的回答评论的那样,这将包含在论文(即 LaTeX)中,我建议使用 LevelScheme 包。他花了很多时间研究如何在 Mathematica 中布局图形,它允许您使用刻度线做一些 Mathematica 默认情况下不做的事情。它不是世界上最快的包,并且需要一些时间来学习,但我强烈推荐它。

Personally, I hate using GraphicsGrid as I find its results unpredictable. As you commented on @High Performance Mark's answer that this is to be included in a paper (i.e. LaTeX), I'd suggest using the LevelScheme package by Mark Caprio. He's spent a lot of time figuring out how to lay out graphics in Mathematica, and it allows you to do sane things with tick marks that Mathematica does not do by default. It isn't the fastest package in the world, and takes a little to learn, but I highly recommend it.

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