Dot:如何用黑色轮廓装饰图形节点,同时用另一种颜色填充?

发布于 2024-11-30 23:39:43 字数 281 浏览 5 评论 0原文

我需要格式化点图的帮助。为了简化我的问题,我在这里有一个点代码,我通过点工具运行它:

digraph G
{
   TestNode [label="Test Node", shape="egg" style="filled" color="yellow"]
}

结果是:

在此处输入图像描述

我想要这个节点有一个黑色轮廓。我怎样才能做到这一点?

I need help with formatting a dot graph. To simplify my question, I have a dot code here which I run through a dot tool:

digraph G
{
   TestNode [label="Test Node", shape="egg" style="filled" color="yellow"]
}

results in this:

enter image description here

I want to have a black outline to this node. How can I do that?

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

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

发布评论

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

评论(1

深海夜未眠 2024-12-07 23:39:43

fillcolorcolor 一起使用确实可以实现您的目标:

TestNode [label="Test Node", shape="egg", style="filled", color="black", fillcolor="yellow"]

Graphviz带轮廓的节点

来自文档:

用于填充节点或簇背景的颜色(假设)
样式=填充。如果未定义 fillcolor,则使用颜色。

Using fillcolor together with color does achieve what you're after:

TestNode [label="Test Node", shape="egg", style="filled", color="black", fillcolor="yellow"]

Graphviz node with outline

From the documentation:

Color used to fill the background of a node or cluster assuming
style=filled. If fillcolor is not defined, color is used.

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