这是PlantUML 中的MCVE:
@startuml
'Define the components
[Main component] as c_main_component
[comp1] as c_comp1
[com2] as c_comp2
[comp3] as c_comp3
[comp4] as c_comp4
'Define the relationships
c_main_component -- c_comp3
c_main_component -- c_comp4
c_main_component - c_comp2
c_main_component - c_comp1
@enduml
以上结果如下图:
正如人们所看到的,comp3
有comp4
一条漂亮的对角线Main component
从底部连接它,就像预期的那样。我想要comp1
并且comp2
有同样漂亮的对角线Main component
从右侧连接。我该怎么做?
PlantUML 使用以下选项生成的代码-debugsvek
:
digraph unix {
nodesep=0.486111;
ranksep=0.833333;
remincross=true;
searchsize=500;
sh0004->sh0006[arrowtail=none,arrowhead=none,minlen=0,color="#000011"];
sh0004->sh0005[arrowtail=none,arrowhead=none,minlen=0,color="#000015"];
sh0004 [shape=rect,label="",width=1.722222,height=0.522352,color="#000004"];
sh0005 [shape=rect,label="",width=0.861111,height=0.522352,color="#000005"];
sh0006 [shape=rect,label="",width=0.750000,height=0.522352,color="#000006"];
sh0007 [shape=rect,label="",width=0.861111,height=0.522352,color="#000007"];
sh0008 [shape=rect,label="",width=0.861111,height=0.522352,color="#000008"];
sh0004->sh0007[arrowtail=none,arrowhead=none,minlen=1,color="#000009"];
sh0004->sh0008[arrowtail=none,arrowhead=none,minlen=1,color="#00000D"];
}