我在以下点文件中使用GraphViz:
digraph G
{
rankdir=LR;
subgraph commits
{
"5c071a6b2c" -> "968bda3251" -> "9754d40473" -> "9e59700d33" -> "2a3242efa4";
}
subgraph annotations
{
"V1.0" [shape=box];
"br/HEAD" [shape=box];
"V1.0" -> "9e59700d33" [weight=0];
"br/HEAD" -> "2a3242efa4" [weight=0];
}
}它给了我这样的东西:

但我想要这样的东西:
V1.0 br/HEAD | | \/ \/ 5c071a6b2c -> 968 3251 -> 9754d40473 -> 9e59700d33 -> 2a3242efa4
我怎么能这么做?
谢谢你的帮助,提前谢了。
发布于 2013-01-09 15:27:58
这将使注释与提交保持一致:
digraph G
{
rankdir=LR;
subgraph commits
{
"5c071a6b2c" -> "968bda3251" -> "9754d40473" -> "9e59700d33" -> "2a3242efa4";
}
subgraph annotations1
{
rank="same";
"V1.0" [shape=box];
"V1.0" -> "9e59700d33" [weight=0];
}
subgraph annotations2
{
rank="same";
"br/HEAD" [shape=box];
"br/HEAD" -> "2a3242efa4" [weight=0];
}
}由于rank="same";影响整个子图,所以我不得不将注释拆分到两个不同的子图中。
结果是:

https://stackoverflow.com/questions/14236804
复制相似问题