为什么 graphviz 绘制两个箭头,并使用奇怪的顺序?
为什么graphviz从uncap_spike到peel绘制了两个箭头,为什么它在hang的右侧绘制了peel?
我想要 uncap_spike ->剥皮->挂起->尖峰,按此顺序,每个尖峰之间有一个边缘。
digraph hangers {
compound=true
fontname="Gill Sans"
node [fontname="Gill Sans" shape=box fillcolor=white style="rounded, filled"]
edge [fontname="Gill Sans"]
subgraph cluster_prep {
style="filled"
label=Prep
gather [shape=Mrecord label="{gather | EtOH swab\nvented tubing}"]
uncap_bottle [label="uncap bottle"]
uncap_spike [label="uncap spike"]
swab [shape=Mrecord label="{swab EtOH | wait 30 seconds for sterility}"]
gather -> uncap_bottle -> swab -> uncap_spike
{rank=same gather uncap_bottle swab uncap_spike}
}
subgraph cluster_hang {
style=filled
label=Hang
{rank=same peel hang}
}
{rank=same uncap_spike -> peel -> hang -> spike -> prime}
hang -> rip [color=firebrick]
rip [label="eyelet\nripped" style="filled" shape=octagon regular fontcolor=white
fontsize=10 width=.5 fixedsize color=firebrick fillcolor=firebrick ]
swab -> not_sterile [color=firebrick]
not_sterile [label="not\nsterile" style="filled" shape=octagon regular fontcolor=white
fontsize=10 width=.5 fixedsize color=firebrick fillcolor=firebrick ]
}
Why is graphviz drawing two arrows from uncap_spike to peel, and why is it drawing peel to the right of hang?
I want uncap_spike -> peel -> hang -> spike, in that order, with one edge between each.
digraph hangers {
compound=true
fontname="Gill Sans"
node [fontname="Gill Sans" shape=box fillcolor=white style="rounded, filled"]
edge [fontname="Gill Sans"]
subgraph cluster_prep {
style="filled"
label=Prep
gather [shape=Mrecord label="{gather | EtOH swab\nvented tubing}"]
uncap_bottle [label="uncap bottle"]
uncap_spike [label="uncap spike"]
swab [shape=Mrecord label="{swab EtOH | wait 30 seconds for sterility}"]
gather -> uncap_bottle -> swab -> uncap_spike
{rank=same gather uncap_bottle swab uncap_spike}
}
subgraph cluster_hang {
style=filled
label=Hang
{rank=same peel hang}
}
{rank=same uncap_spike -> peel -> hang -> spike -> prime}
hang -> rip [color=firebrick]
rip [label="eyelet\nripped" style="filled" shape=octagon regular fontcolor=white
fontsize=10 width=.5 fixedsize color=firebrick fillcolor=firebrick ]
swab -> not_sterile [color=firebrick]
not_sterile [label="not\nsterile" style="filled" shape=octagon regular fontcolor=white
fontsize=10 width=.5 fixedsize color=firebrick fillcolor=firebrick ]
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为排名=相同可能会令人困惑。你用它来保持一切水平吗?在这种情况下,您可以将一个属性(rankdir?)应用于整个图表。
I think that the rank=same might be confusing. Are you using it to keep everything horizontally? In that case there is an attribute (rankdir?) that you can apply to the entire graph instead.