的Graphviz点对齐节点垂直

weixin_38058190 2019-09-12 02:15:42

我有以下graphviz的圆点输入文件: digraph structs { rankdir = LR; node [shape=record]; hashTable [label="<f0>0|<f1>1|<f2>2|<f3>3|<f4>4|<f5>5|<f6>6|<f7>7|<f8>8"]; node_1_0 [label="<f0> one|<f1> two |<f2> three"]; node_1_1 [label="<f0> un |<f1> deux|<f2> trois"]; struct3 [label="<f0> einz|<f1> swei|<f2> drei"]; hashTable:f1 -> node_1_0:f0; node_1_0:f2 -> node_1_1:f0; hashTable:f4 -> struct3:f0; } 其获取呈现这样的: 我怎么能有[一|二|三]节点垂直对齐到[un | deux | trois]节点?谢谢!






...全文
311 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38065223 2019-09-12
  • 打赏
  • 举报
回复

编辑澄清注释后:在这里,具有较强的重量一种无形的边缘有助于保持节点一致: digraph structs2 { rankdir = LR; node [shape=record]; splines=false; // optional; gives straight lines hashTable [label="<f0>0|<f1>1|<f2>2|<f3>3|<f4>4|<f5>5|<f6>6|<f7>7|<f8>8"]; node_1_0 [label="<f0> one|<f1> two |<f2> three" ]; node_1_1 [label="<f0> un |<f1> deux|<f2> trois"]; struct3 [label="<f0> einz|<f1> swei|<f2> drei"]; // node_1_0 -> node_1_1[ style = invis, weight= 10 ]; // ^^^^^^^^^^^^^^^^^^^^^^^^^ hashTable:f1 -> node_1_0:f0; node_1_0:f2 -> node_1_1:f0; hashTable:f4 -> struct3:f0; } 给你(我相信)你想要什么: ............... 原始回答是: 回答您面值的问题,这可以迅速地通过将它们放入同一级别实现: digraph structs { rankdir = LR; node [shape=record]; hashTable [label="<f0>0|<f1>1|<f2>2|<f3>3|<f4>4|<f5>5|<f6>6|<f7>7|<f8>8"]; node_1_0 [label="<f0> one|<f1> two |<f2> three"]; node_1_1 [label="<f0> un |<f1> deux|<f2> trois"]; struct3 [label="<f0> einz|<f1> swei|<f2> drei"]; {rank = same; node_1_0 node_1_1 } hashTable:f1 -> node_1_0:f0; node_1_0:f2 -> node_1_1:f0; hashTable:f4 -> struct3:f0; } 产生

477

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧