有没有办法为Doxygen中的GraphViz点指定配色方案?

发布于 2025-01-29 04:05:59 字数 125 浏览 2 评论 0原文

默认方案不是很明亮,并且点从命令行制作图形时可以设置不同的方案。 doxygen将dot_fontname公开以将字体参数传递到点,但似乎没有配色方案?有人知道是否有自定义标签可以设置该标签,还是在GraphViz上设置默认方案的方法?

The default scheme isn't very bright and dots has different schemes that can be set when making graphs from the command-line. Doxygen exposes DOT_FONTNAME to pass a font argument to dots but doesn't seem to have that for the color scheme? Does anyone know if there is a custom tag to set that, or a way to set a default scheme on GraphViz?

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

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

发布评论

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

评论(1

日久见人心 2025-02-05 04:05:59

您可以使用 brewer yrewer配色方案以定义一种从您可以选择一个带有索引(1、2、3,...)的一个。

当您想更改调色板时,只需更改节点(或边缘或图形)的默认配色方案,然后将相应地更新图中所有节点的实际显示颜色。

此示例使用配色方案set39

digraph {
    node [colorscheme=set39];
    node [shape=rectangle, style="filled", fillcolor=1]
        a
    node [shape=ellipse, style="filled", fillcolor=4]
        b
    a -> b
}

​> colorscheme 第一个节点元素的属性(“默认”),您可以更改所有节点的颜色

digraph {
    node [colorscheme=spectral10];
    node [shape=rectangle, style="filled", fillcolor=1]
        a
    node [shape=ellipse, style="filled", fillcolor=4]
        b
    a -> b
}

”

You can use the Brewer colour schemes to define a "palette" of colours from which you can choose one with an index (1, 2, 3, ...).

When you want to change the palette, you just have to change the default colour scheme for nodes (or edge, or graph), the actual display colour of all nodes in the graph will then be updated accordingly.

This example uses colour scheme set39:

digraph {
    node [colorscheme=set39];
    node [shape=rectangle, style="filled", fillcolor=1]
        a
    node [shape=ellipse, style="filled", fillcolor=4]
        b
    a -> b
}

enter image description here

By changing only the colorscheme property of the first node element (the "default"), you can change the colour of all nodes:

digraph {
    node [colorscheme=spectral10];
    node [shape=rectangle, style="filled", fillcolor=1]
        a
    node [shape=ellipse, style="filled", fillcolor=4]
        b
    a -> b
}

enter image description here

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