"LayeredEmbedding" (Graph Layout Method)
"LayeredEmbedding" (Graph Layout Method)
- Vertex layout for GraphLayout.
- Use layered embedding to lay out vertices of a graph.
Details & Suboptions
- The layered digraph embedding is a graph-drawing technique to position vertices of a graph on parallel lines.
- The layered embedding is typically used to lay out acyclic graphs.
- Possible settings to control the layout include:
-
"LayerSizeFunction" Automatic relative height function "LeafDistance" Automatic leaf distance "Orientation" Automatic layout orientation "RootVertex" Automatic root vertex "Rotation" Automatic layout rotation
Examples
open all close allBasic Examples (3)
Place vertices in several layers in such a way as to minimize edges between nonadjacent layers:
Graph[Table[iMod[i + 1, 5], {i, 12}], GraphLayout -> "LayeredEmbedding"]"LayeredEmbedding" works best for tree graphs:
TreeGraph[RandomInteger[{1, #}] # + 1 & /@ Range[20], GraphLayout -> "LayeredEmbedding"]The layered drawing works on arbitrary graphs:
RandomGraph[{20, 30}, GraphLayout -> "LayeredEmbedding"]