"BalloonEmbedding" (Graph Layout Method)
"BalloonEmbedding" (Graph Layout Method)
- Vertex layout for GraphLayout.
- Use balloon embedding to lay out vertices of a graph.
Details & Suboptions
- The balloon embedding is a graph-drawing technique to position vertices of a graph on a circle with the center at the parent vertex.
- The balloon embedding is typically used to lay out tree graphs.
- Possible settings to control the layout include:
-
"EvenAngle" Automatic vertices placed evenly in an enclosing circle "OptimalOrder" True optimal ordering of vertices to minimize edge crossings "RootVertex" Automatic root vertex "SectorAngles" Automatic size of the angle of each sector "Rotation" Automatic layout rotation
Examples
open all close allBasic Examples (2)
Place each vertex in an enclosing circle centered at its parent vertex:
Graph[Table[Floor[j / 12]j, {j, 1, 30}], GraphLayout -> "BalloonEmbedding"]"BalloonEmbedding" works best for tree graphs:
TreeGraph[RandomInteger[{1, #}] # + 1 & /@ Range[30], GraphLayout -> "BalloonEmbedding"]Options (5)
"EvenAngle" (1)
Use the option "EvenAngle"True to place vertices evenly in an enclosing circle:
{KaryTree[48, 5, GraphLayout -> {"BalloonEmbedding", "EvenAngle" -> True}],
KaryTree[48, 5, GraphLayout -> {"BalloonEmbedding", "EvenAngle" -> False}]}"OptimalOrder" (1)
With the setting "OptimalOrder"True, the vertex ordering optimizes the angular resolution and the aspect ratio:
{KaryTree[48, 5, GraphLayout -> {"BalloonEmbedding", "OptimalOrder" -> True}],
KaryTree[48, 5, GraphLayout -> {"BalloonEmbedding", "OptimalOrder" -> False}]}