我想在Graphviz中更改边缘标签的背景颜色。目前,我能看到的唯一方法就是使用HTML表格。
例如,
edge [len=3,fontcolor=red];
DeviceA -- DeviceB [headlabel=<
<table border="0" cellborder="0">
<tr>
<td bgcolor="white">Head Label</td>
</tr>
</table>>
,taillabel="Tail Label"];
我希望能做的更短/更清洁:
edge [len=3,fontcolor=red,bgcolour=white];
DeviceA -- DeviceB [headlabel="Head Label",taillabel="Tail Label"];
他们在graphviz中可以选择吗?
我尝试这样做的原因是因为结束标签最终写在边缘上,这使得标签难以阅读,背景颜色与画布颜色相同,人为地在边缘创建了一个中断。
由于
答案 0 :(得分:2)
在GraphViz中,无法更改边缘标签的背景颜色。但是,您可以通过使用HTML表来实现相同目的:
例如:
edge [len=3,fontcolor=red];
DeviceA -- DeviceB [headlabel=<
<table border="0" cellborder="0">
<tr>
<td bgcolor="white">Head Label</td>
</tr>
</table>>
,taillabel="Tail Label"];