为什么graphviz绘制两个箭头并使用奇怪的顺序? [英] Why is graphviz drawing two arrows, and using a weird order?

查看:44
本文介绍了为什么graphviz绘制两个箭头并使用奇怪的顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

graphviz为什么从uncap_spike绘制两个箭头来剥皮,为什么在挂起的右边绘制剥皮?

我要uncap_spike->剥皮->悬挂->尖峰,以这种顺序,每个边缘之间有一条边缘.

替代文本http://grab.by/33kA

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 ]


}

解决方案

我认为rank = same可能令人困惑.您是否正在使用它使所有东西保持水平?在这种情况下,您可以将一个属性(rankdir?)应用于整个图形.

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.

alt text http://grab.by/33kA

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 ]


}

解决方案

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.

这篇关于为什么graphviz绘制两个箭头并使用奇怪的顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆