如何使用quickgraph和graph#库绘制边缘带有标签的有向图?

发布于 2024-09-16 12:55:41 字数 241 浏览 2 评论 0原文

我正在尝试绘制边缘带有标签的有向图。我正在使用 graph# (graphsharp) 和 Quickgraph,我在论坛中看到了有关如何添加标签的解释(库不支持它),但无法自己实现。如果有人可以提供使用这两个库的工作示例,我将非常感激。

更新: 我现在正在寻找一些更复杂的东西:我的边缘的行为就像节点一样,它们与其他节点有连接并且有一个名称标签。因此,它们就像任何其他节点一样,当我绘制图形时,这些边缘节点必须恰好出现在某些连接的中间。有什么想法吗?

I'm trying to draw a directed graph with labels on edges. I'm using graph# (graphsharp) and quickgraph, and I saw an explanation in the forums about how to add labels (it is not supported by the library), but cannot manage to implement myself. If someone could provide a working example using these two libraries I would be very thankful.

Update:
I'm now looking for something a little more complicated: My edges behave like nodes, they have connections to other nodes and have a name-tag. So they are like any other node, and when I draw the graph these edge-nodes must appear exactly in the middle of a certain connections. Any ideas?

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

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

发布评论

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

评论(1

慢慢从新开始 2024-09-23 12:55:41

尽管没有记录,但 QuickGraph 支持输出为其他格式,例如 DGML。 VS 2010 包含一个非常基本的 DGML 查看器。可以输出 DGML,以便生成的图具有边缘标签。但是,您可能需要自己添加支持。

下载 QuickGraph 源代码并使用它。我是该项目的提交者,所以如果您弄清楚了,请告诉我,我们会将您的更改纳入项目中。

Although it's not documented, QuickGraph supports output to other formats, like DGML. VS 2010 includes a very basic DGML viewer. It may be possible to output DGML so that the resulting graph has edge labels. However you will likely need to add support yourself.

Download the QuickGraph sources and play around with it. I'm a committer on the project, so if you figure it out let me know and we'll get your changes into the project.

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