weivall
weivall

Reputation: 987

Format string in graphviz

How can I format string in graphviz NODE ?

Now I have common styles for NODE

node [  href=\"#\",
        shape=box,
        style=filled,
        fillcolor=azure,
        color = lightblue3,
        fontname=Helvetica,
        center=true,
        fontsize=9
    ]

I want to change date format enter image description here

Upvotes: 0

Views: 552

Answers (2)

Sisyphus
Sisyphus

Reputation: 926

Use html label

node[label=<>]

An example

i0[label=<
    <TABLE border="0">
        <TR>
            <TD valign="top" rowspan="2">
                I<sub>0</sub>:
            </TD>
            <TD align="left">
                S'→.S<BR ALIGN="LEFT"/>
            </TD>
        </TR>
        <TR>
            <TD align="left" bgcolor="#aaaaaa">
                S→.SS<BR ALIGN="LEFT"/>
                S→.(S)<BR ALIGN="LEFT"/>
                S→.a<BR ALIGN="LEFT"/>
            </TD>
        </TR>
    </TABLE>
>];

Upvotes: 4

Rick
Rick

Reputation: 1607

You should be able to do this with html(-like) labels. Give the table one style and that cell a different style. Keep in mind that this HTML is a very constrained subset of real HTML.

Upvotes: 0

Related Questions