【发布时间】:2022-01-27 03:21:02
【问题描述】:
这是我的图表:
是否可以将“面向用户的选项”子图向下移动,以便“面向用户的内容”位于该子图和“内部标签”子图的上方?我尝试使用https://stackoverflow.com/a/18410951/2954547 中描述的技术来强制topic 或role 与tag 对齐,但出于某种原因,它真的很想将另一个节点放在该子图中上方 tag 节点,而不是在它下面。
我看到你也可以乱用weight参数来调整输出,就像https://stackoverflow.com/a/14348263/2954547一样,但这只是让行越来越短。
我想要的输出是像这样移动左子图:
当前源代码:
digraph G {
compound=true;
newrank=true;
subgraph cluster_userFacing {
label="User-facing options";
labelloc="bottom";
role [label="User Role\n(User Classification)"];
topic [label="Topic\n(External Tag)"];
}
subgraph cluster_content {
label="User-facing Content";
article [label="Article"];
podcastEpisode [label="Podcast Episode"];
}
subgraph cluster_internal {
label="Internal tags";
labelloc="bottom";
tag [label="Tag\n(Internal Tag)"];
tagCategory [label="Tag Category"];
tag -> tagCategory;
}
role -> tag [dir="none"];
topic -> tag [dir="none"];
article -> tag;
podcastEpisode -> tag;
{ rank="min"; podcastEpisode; article; }
{ rank="same"; topic; tag; }
}
【问题讨论】:
标签: graphviz