margin
對於圖形,此屬性設定畫布的 x 和 y 邊界,單位為英吋
類型:double | point,預設值:<device-dependent>
如果邊界是單個 double,則兩個邊界都會設定為給定的值。
請注意,邊界不是繪圖的一部分,而只是繪圖周圍留下的空白空間。邊界基本上對應於繪圖的平移,就像將繪圖置於頁面中心所需的那樣。邊界中實際上沒有繪製任何東西。要實際擴展繪圖的背景,請參閱 pad
屬性。
對於叢集,margin
指定叢集中的節點與叢集邊界框之間的空間。預設情況下,此值為 8 點。
對於節點,此屬性指定節點標籤周圍留下的空間。預設情況下,值為 0.11,0.055
。
節點範例:高邊界、寬邊界和等邊界
graph {
"1.5x0.5" [shape=rect margin="1.5,0.5"] # in inches
"0.5x1.5" [shape=rect margin="0.5,1.5"] # in inches
"1.5x1.5" [shape=rect margin="1.5"] # in inches
}
範例:叢集和圖形邊界
graph {
bgcolor=lightgray
margin=0 # in inches
subgraph cluster_one {
margin=8 # in points
a
b
}
subgraph cluster_two {
margin=16 # in points
c
d
}
}
- 節點
- 叢集
- 圖形