admin管理员组文章数量:1024158
I want a table of 2 columns with graphviz. Within the first columns I would like to have fixed positions for the nodes (x and Y). The other nodes can be freely positioned by graphviz within the assigned (other) column, i.e. the Y position does not matter. The positions within the first columns should not change, regardless of the connections to the nodes in the other columns
digraph G {
rankdir=LR;
node [shape=box];
subgraph cluster_0 {
label = "Spalte 1";
a [pos="0,2!"];
b [pos="0,1!"];
c [pos="0,0!"];
}
subgraph cluster_1 {
label = "Spalte 2";
d;
e;
f;
}
a-> e;
a -> f;
}
Currently the column slides up instead of the nodes within the column. Just change a-> to somethig to see it.
I want a table of 2 columns with graphviz. Within the first columns I would like to have fixed positions for the nodes (x and Y). The other nodes can be freely positioned by graphviz within the assigned (other) column, i.e. the Y position does not matter. The positions within the first columns should not change, regardless of the connections to the nodes in the other columns
digraph G {
rankdir=LR;
node [shape=box];
subgraph cluster_0 {
label = "Spalte 1";
a [pos="0,2!"];
b [pos="0,1!"];
c [pos="0,0!"];
}
subgraph cluster_1 {
label = "Spalte 2";
d;
e;
f;
}
a-> e;
a -> f;
}
Currently the column slides up instead of the nodes within the column. Just change a-> to somethig to see it.
Share Improve this question edited Nov 18, 2024 at 19:11 eshirvana 24.7k3 gold badges27 silver badges42 bronze badges asked Nov 18, 2024 at 19:10 ozzozz 1831 silver badge13 bronze badges1 Answer
Reset to default 0packmode (https://www.graphviz./docs/attr-types/packMode/) seems to accomplish your goal.
Note that nodes are in first-in-last-out order.
digraph G {
rankdir=LR;
packmode="array_ic2" // the two clusters must not be connected (no edges)
// packmode works best with recent (~2024 and later) releases of Graphviz
node [shape=box];
subgraph cluster_0 {
label = "Spalte 1";
a [pos="0,2!"]; // fyi, dot ignores all pos attributes
b [pos="0,1!"];
c [pos="0,0!"];
}
subgraph cluster_1 {
label = "Spalte 2";
d;
e;
f;
}
// packmode requires no edges between the clusters to be "packed"
// a-> e;
// a -> f;
}
Giving:
I want a table of 2 columns with graphviz. Within the first columns I would like to have fixed positions for the nodes (x and Y). The other nodes can be freely positioned by graphviz within the assigned (other) column, i.e. the Y position does not matter. The positions within the first columns should not change, regardless of the connections to the nodes in the other columns
digraph G {
rankdir=LR;
node [shape=box];
subgraph cluster_0 {
label = "Spalte 1";
a [pos="0,2!"];
b [pos="0,1!"];
c [pos="0,0!"];
}
subgraph cluster_1 {
label = "Spalte 2";
d;
e;
f;
}
a-> e;
a -> f;
}
Currently the column slides up instead of the nodes within the column. Just change a-> to somethig to see it.
I want a table of 2 columns with graphviz. Within the first columns I would like to have fixed positions for the nodes (x and Y). The other nodes can be freely positioned by graphviz within the assigned (other) column, i.e. the Y position does not matter. The positions within the first columns should not change, regardless of the connections to the nodes in the other columns
digraph G {
rankdir=LR;
node [shape=box];
subgraph cluster_0 {
label = "Spalte 1";
a [pos="0,2!"];
b [pos="0,1!"];
c [pos="0,0!"];
}
subgraph cluster_1 {
label = "Spalte 2";
d;
e;
f;
}
a-> e;
a -> f;
}
Currently the column slides up instead of the nodes within the column. Just change a-> to somethig to see it.
Share Improve this question edited Nov 18, 2024 at 19:11 eshirvana 24.7k3 gold badges27 silver badges42 bronze badges asked Nov 18, 2024 at 19:10 ozzozz 1831 silver badge13 bronze badges1 Answer
Reset to default 0packmode (https://www.graphviz./docs/attr-types/packMode/) seems to accomplish your goal.
Note that nodes are in first-in-last-out order.
digraph G {
rankdir=LR;
packmode="array_ic2" // the two clusters must not be connected (no edges)
// packmode works best with recent (~2024 and later) releases of Graphviz
node [shape=box];
subgraph cluster_0 {
label = "Spalte 1";
a [pos="0,2!"]; // fyi, dot ignores all pos attributes
b [pos="0,1!"];
c [pos="0,0!"];
}
subgraph cluster_1 {
label = "Spalte 2";
d;
e;
f;
}
// packmode requires no edges between the clusters to be "packed"
// a-> e;
// a -> f;
}
Giving:
本文标签: graphvizFixed position in the first column for the nodesnot in the othersStack Overflow
版权声明:本文标题:graphviz - Fixed position in the first column for the nodes, not in the others - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745599549a2158375.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论