在 graphviz 边缘添加颜色渐变

Adding color gradient in graphviz edges

根据给定的示例 here,我可以使用 weight/penwidth 更改边缘宽度。

我可以使用 color 添加颜色。

现在,怎么放渐变?这对边缘来说甚至可能吗?

貌似不是。如果你读到这里:https://graphviz.org/docs/attr-types/colorList/ and here: https://graphviz.org/docs/attrs/color/,你会发现渐变是可以的,但对于边则不行。您得到的不是渐变,而是平行的彩色线条。

For edges, the value can either be a single color or a colorList.

In the latter case, if colorList has no fractions, the edge is drawn using parallel splines or lines, one for each color in the list, in the order given.