How to underline text as part of a label?

不羁的心 提交于 2021-02-08 19:54:26

问题


Following is code using dot language.

subgraph cluster1
            {
            node[style=filled];
            color=blue;
            b0->b1;

            label ="Tada"; // I want this to show as underlined.
            }

回答1:


You can use HTML-like labels and the <u> tag:

digraph cluster1
{
    node[style=filled, color=blue];
    b0->b1;

    label = <<u>Tada</u>>; // I want this to show as underlined.
}

This is the result:

Tada!

Note that your color=blue statement wasn't applied to any element. I moved it into node.

As pointed out in the comments, this currently only works for svg output. I tried with png and pdf on my Mac running 10.14.6 and they weren't underlined.



来源:https://stackoverflow.com/questions/22456268/how-to-underline-text-as-part-of-a-label

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!