Making a Legend/Key in GraphViz

digraph { rankdir=LR node [shape=plaintext] subgraph cluster_01 { label = “Legend”; key [label=<<table border=”0″ cellpadding=”2″ cellspacing=”0″ cellborder=”0″> <tr><td align=”right” port=”i1″>item 1</td></tr> <tr><td align=”right” port=”i2″>item 2</td></tr> <tr><td align=”right” port=”i3″>item 3</td></tr> <tr><td align=”right” port=”i4″>item 4</td></tr> </table>>] key2 [label=<<table border=”0″ cellpadding=”2″ cellspacing=”0″ cellborder=”0″> <tr><td port=”i1″>&nbsp;</td></tr> <tr><td port=”i2″>&nbsp;</td></tr> <tr><td port=”i3″>&nbsp;</td></tr> <tr><td port=”i4″>&nbsp;</td></tr> </table>>] key:i1:e -> key2:i1:w [style=dashed] key:i2:e -> … Read more

Graphviz: change font for the whole graph?

No, there is no other way. As in the forum post you linked, you have to define the default values separately (like the other attributes) at the beginning of your graphviz file: digraph g { graph [fontname = “helvetica”]; node [fontname = “helvetica”]; edge [fontname = “helvetica”]; … }

Display labels in line with the edge when using Graphviz

Using dot2latex allows you to specify lblstyle attribute. The value of lblstyle is used by PGF/TikZ in pdf generation. One can specify parallel labels like this: digraph G { edge [lblstyle=”above, sloped”]; a -> b [label=”ab”]; b -> c [label=”bc”]; c -> a [label=”ca”]; } To generate the pdf $ dot2tex –tikzedgelabel file.dot > file.tex … Read more

Graphviz, changing the size of edge

I wanted to supplement shuvalov’s answer. penwidth is indeed the correct command. Additionally, in shuvalov’s answer penwidth is both a node and an edge property–also correct. The distinction i wanted to make: penwidth, when used as a node property (e.g., “NodeA” [penwidth = 5]) affects the border line weight for that node penwidth, when used … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)