Making a Legend/Key in GraphViz

前端 未结 6 1419
失恋的感觉
失恋的感觉 2020-12-12 12:28

I’d like to include a legend or key in my GraphViz diagram. I’m having trouble figuring out what code to use, though. I also want to put it in a corner, but the only coord I

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-12 13:22

    digraph {
      rankdir=LR
      node [shape=plaintext]
      subgraph cluster_01 { 
        label = "Legend";
        key [label=<
    item 1
    item 2
    item 3
    item 4
    >] key2 [label=<
     
     
     
     
    >] key:i1:e -> key2:i1:w [style=dashed] key:i2:e -> key2:i2:w [color=gray] key:i3:e -> key2:i3:w [color=peachpuff3] key:i4:e -> key2:i4:w [color=turquoise4, style=dotted] } ...

    enter image description here

    I used dot.

提交回复
热议问题