本文介绍了使用graphviz和neato防止记录重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个点文件来表示计算机硬件以及与网络交换机和显示器的物理连接.当由点程序处理时,它看起来还不错,但我认为我真的希望由neato处理它,以便在图像开始模糊时创建一个更自由形式"的图片.现在,当我使用neato运行大型文件时,一切都重叠了.

I am building a dot file to represent computer hardware and the physical connections to a network switch and displays. I have it looking ok when processed by the dot program but I think I really want it processed by neato to create a more "free form" picture as it starts to grom. Right now when I run my large file with neato, everything is overlapping.

我试图弄清楚在哪里定义overlap属性的语法.以下是我的点文件的子集.

I am trying to figure out the syntax on where to define the overlap attribute. Below is a subset of my dot file.

graph g {
    node [shape=record,height=.1];
    PC8[label="{{<GigE1>GigE1|<GigE2>GigE2}|{<name>PC8}|{<dvi1>dvi1|<dvi2>dvi2|<dvi3>dvi3|<dvi4>dvi4}}"];
    PC9[label="{{<GigE1>GigE1|<GigE2>GigE2}|{<name>PC9}|{<dvi1>dvi1|<dvi2>dvi2|<dvi3>dvi3|<dvi4>dvi4}}"];
    C1[label = "{{<dvi1>dvi1}|{<name>C1}}"];
    C2[label = "{{<dvi1>dvi1}|{<name>C2}}"];
    C3[label = "{{<dvi1>dvi1}|{<name>C3}}"];
    C4[label = "{{<dvi1>dvi1}|{<name>C4}}"];
    D1[label = "{{<dvi1>dvi1}|{<name>D1}}"];
    D2[label = "{{<dvi1>dvi1}|{<name>D2}}"];
    "PC8":dvi1 -- "C1":dvi1;
    "PC8":dvi2 -- "C2":dvi1;
    "PC8":dvi3 -- "C3":dvi1;
    "PC8":dvi4 -- "C4":dvi1;
    "PC9":dvi1 -- "D1":dvi1;
    "PC9":dvi2 -- "D2":dvi1;
}

推荐答案

这样做:

graph g {
    overlap = false;

    node [shape=record,height=.1];
    /* ... */
}

这篇关于使用graphviz和neato防止记录重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 17:56