Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to underline text as part of a label?

Tags:

graphviz

Following is code using dot language.

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

            label ="Tada"; // I want this to show as underlined.
            }
like image 661
a3.14_Infinity Avatar asked Mar 17 '14 13:03

a3.14_Infinity


People also ask

How do you underline text in a HTML label?

The <u> tag in HTML stands for underline, and it's used to underline the text enclosed within the <u> tag. This tag is generally used to underline misspelled words. This tag requires a starting as well as ending tag.

How do you set an underline for text?

Select the text that you want to underline. Go to Home > Underline. Or press Ctrl+U.

How do you underline text in Python?

To Underline Text In Python, the Unicode character "\u0332" , acts as an underline on the character that precedes it in a string. So, if you put any string after this Unicode, the text will be printed underlined in Python.


1 Answers

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.

like image 153
SSteve Avatar answered Sep 22 '22 22:09

SSteve