- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在 GraphViz 中绘制 Chimera 类型的图形: https://www.ibm.com/developerworks/community/blogs/jfp/resource/BLOGS_UPLOADED_IMAGES/chimera.png
因此特定节点之间有一些直边,但也有弯曲边,并且节点是固定的。我已经确定了我想要在其间具有弯曲边缘的所有节点,但我无法使这些边缘正确弯曲。
graph G {
size = 5
0 [shape = circle, pin=true, pos="1,4!"]; 1 [shape = circle, pin=true, pos="2,4!"]; 2 [shape = circle, pin=true, pos="3,4!"]; 3 [shap\
e = circle, pin=true, pos="4,4!"]; 4 [shape = circle, pin=true, pos="1,3!"]; 5 [shape = circle, pin=true, pos="2,3!"]; 6 [shape = cir\
cle, pin=true, pos="3,3!"]; 7 [shape = circle, pin=true, pos="4,3!"]; 8 [shape = circle, pin=true, pos="1,2!"]; 9 [shape = circle, pi\
n=true, pos="2,2!"]; 10 [shape = circle, pin=true, pos="3,2!"]; 11 [shape = circle, pin=true, pos="4,2!"]; 12 [shape = circle, pin=tr\
ue, pos="1,1!"]; 13 [shape = circle, pin=true, pos="2,1!"]; 14 [shape = circle, pin=true, pos="3,1!"]; 15 [shape = circle, pin=true, \
pos="4,1!"];
0--1; 0--5; 0--9; 0--13; 1--3 [splines = "curved"]; 2--3; 2--7; 2--11; 2--15; 4--1; 4--5; 4--9; 4--13; 5--7 [splines = "curved"]; 6--3; 6\
--7; 6--11; 6--15; 8--1; 8--5; 8--9; 8--13; 9--11 [splines = "curved"]; 10--3; 10--7; 10--11; 10--15; 12--1; 12--5; 12--9; 12--13; 13--\
15 [splines = "curved"]; 14--3; 14--7; 14--11; 14--15;
}
上面是我的点文件。 (我使用“neato -Tps graph.dot -o graph.ps”绘制它)。
我认为您可以通过将 splines = "curved"作为图形属性来全局弯曲边缘,但我想单独弯曲某些边缘,或者至少没有我目前拥有的所有疯狂重叠。
最佳答案
我把你的代码改成了
graph G {
size = 5
node [shape = circle, pin=true ]
0 [ pos="1,4!" ];
1 [ pos="2,4!" ];
2 [ pos="3,4!" ];
3 [ pos="4,4!"];
4 [ pos="1,3!"];
5 [ pos="2,3!"];
6 [ pos="3,3!"];
7 [ pos="4,3!"];
8 [ pos="1,2!"];
9 [ pos="2,2!"];
10 [ pos="3,2!"];
11 [ pos="4,2!"];
12 [ pos="1,1!"];
13 [ pos="2,1!"];
14 [ pos="3,1!"];
15 [ pos="4,1!"];
0 -- { 1, 5, 9, 13 }
1 -- 3 ;
2 -- { 3, 7, 11 15 }
4 -- {1, 5, 9, 13 }
5 -- 7;
6 -- { 3, 7, 11, 15 }
8 -- { 1, 5, 9, 13 }
9 -- 11;
10 -- { 3, 7, 11, 15 }
12 -- { 1, 5, 9, 13 }
13 -- 15;
14 -- { 3, 7, 11, 15 }
}
并用
编译neato -Tpng -Gsplines=true so.gv -o so.png
得到了
这更接近您想要的吗?
关于graphviz - 在 GraphViz 中弯曲一些边,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32432818/
我试图写我自己的 little algorithm用于仅创建节点布局但不定义边路由的图形布局。当我使用 Graphviz 将生成的点文件转换为图形时,边缘是穿过节点甚至相互重叠的直线。有没有一种方法可
我正在创建一个包含一千条边的圆形图。 如果我只在那里放一些,它工作得很好,例如,我可以改变边缘长度。但是,当我将所有数据放入时,我似乎无法再控制大小了。这张图片只是膨胀得离谱,只有微小的节点和与其他节
我正在使用 Doxygen 在我的源代码中制作一些 GraphViz 点图。 问题:由特定点文件生成的图形是否保证始终生成相同的输出? 对于不同的计算机、一天中的不同时间、不同的体系结构等,情况是否如
我怎么能画一个 arc graph在 GraphViz 中?我不能强制节点排成一行。 最佳答案 由于我没有足够的声誉来添加评论,我在这里发布了一些建议。下面的代码解决了强制节点排成一行的问题。 dig
我正在为graphviz HTML nodes使用per my previous question。为什么我要在外面放多余的盒子,如何摆脱它?另外,如何缩小身材? digraph g {
我有一组用 DOT 语言编码的有向图。我想构建一个图图,使得超图中的每个节点都是这些有向图之一。有没有办法在 GraphViz 框架内做到这一点? 我知道gvpack将允许我将多个图形组合成一个 .d
我想知道如何才能 strike-through我的节点中的一些文本基于点 graphviz图表? 我在此页面上查看过,但无法弄清楚: http://www.graphviz.org/doc/info/
我将 Graphviz 用作库 (C++)。我需要 Graphviz 来计算节点和相应边的坐标。我正在渲染自己(即不使用 Graphviz 的渲染器)。我的节点是矩形,具有定义的宽度和高度(以像素为单
我正在使用 Graphviz绘制一些图形。我在节点上使用标签,我可以输入 "\n"强制它将标签分成 2 行。有没有办法让 Graphviz(或我正在使用的 dot)自动看到它应该拆分一些节点标签,并让
我试图在 Graphviz 中的集群之间建立一个边缘,其中边缘不影响排名。 这看起来不错: digraph { subgraph clusterX { A B } s
我正在构建一个epsilon NFA,以使用规范构造来识别正则表达式。我正在使用子图对正则表达式的各个部分进行分组。 *运算符给我特别麻烦,因为dot决定移动节点的顺序。我尝试添加边缘权重以强制使特定
我正在尝试使用点显示从右到左(即向后)的边缘: C B 我能做的最好的是: digraph { a -> b; c -> a [dir="back"]; {rank=same;c a b
我用点语言制作了一棵树,类似于here . 有什么方法可以让树向右扩展,而不是向下扩展(因此根节点位于左侧,子节点向右扩展)。 最佳答案 这很简单,只要你坚持基本布局:place rankdir ="
我有以下 graphviz 文件: digraph ServerDependency { Server02 -> Server01 [tooltip="Database"]; Serv
我有几个相关的子图,我想在 GraphViz 中将它们绘制在一起。当我绘制简单的节点时,它看起来很漂亮: 来源: digraph { rankdir=LR; A1 -> A21; A1 -
我使用下面的代码使用点(graphviz)创建了一个图形。 digraph { node [color=Blue,shape=box] 1.1 [label="Frequency of t e
我用graphviz画了一张图。请参阅FSM 。我认为它很丑,因为自环边缘太短。边缘的属性“minlen”对我不起作用。我尝试了节点的几个端口,但除了我当前的实现之外,一切都显示出一团糟。你有什么好主
基本问题是如何控制 Graphviz 图中元素的垂直和水平定位。 考虑这个图表的摘录(在 wysiwig 编辑器中创建)。 我试图在 Graphviz 中重现它,以确定它是否适合我的目的。 digra
我有一个简单的 .dot 文件(graphviz),见下文: digraph Mapper{ Mapper [label=Mapper]; General [label=General];
我想在 GraphViz 中绘制 Chimera 类型的图形: https://www.ibm.com/developerworks/community/blogs/jfp/resource/BLOG
我是一名优秀的程序员,十分优秀!