is an option to Tree and related functions that specifies what layout to use.
TreeLayout
is an option to Tree and related functions that specifies what layout to use.
Details
- TreeLayout allows the same tree to be graphically displayed in different orientations and two-dimensional embeddings.
- Possible layouts include:
-
Automatic automatically select a layout pos orientation with the root at position pos "emb" named embedding - Possible orientation positions pos include:
-

Top root at the top 
Bottom root at the bottom 
Left root on the left 
Right root on the right - Possible named embeddings "emb" include:
-

"BalloonEmbedding" subtrees on a circle with the center at the parent 
"RadialEmbedding" subtrees on a circular segment 
"LayeredEmbedding" subtrees on parallel lines 
"LayeredDigraphEmbedding" subtrees on parallel lines, with alternative suboptions
Examples
open all close allBasic Examples (2)
Scope (5)
Orientations (1)
"BalloonEmbedding" (1)
Tree[1, {[image], [image], [image]}, TreeLayout -> "BalloonEmbedding"]Tree[1, {[image], [image], [image]}, TreeLayout -> {"BalloonEmbedding", "EvenAngle" -> #}]& /@ {True, False}Tree[1, {[image], [image], [image]}, TreeLayout -> {"BalloonEmbedding", "OptimalOrder" -> #}]& /@ {True, False}Tree[1, {[image], [image], [image]}, TreeLayout -> {"BalloonEmbedding", "RootVertex" -> #}]& /@ {{}, {2}, {2, 2}}Tree[1, {[image], [image], [image]}, TreeLayout -> {"BalloonEmbedding", "Rotation" -> #}]& /@ {45Degree, 30Degree}Tree[1, {[image], [image], [image]}, TreeLayout -> {"BalloonEmbedding", "SectorAngles" -> {1 -> Pi / 2}}]"RadialEmbedding" (1)
Tree[1, {[image], [image], [image]}, TreeLayout -> "RadialEmbedding"]Tree[1, {[image], [image], [image]}, TreeLayout -> {"RadialEmbedding", "RootVertex" -> #}]& /@ {{}, {2}, {2, 2}}Tree[1, {[image], [image], [image]}, TreeLayout -> {"RadialEmbedding", "Rotation" -> #}]& /@ {0, 30, 60, 90}"LayeredEmbedding" (1)
Tree[1, {[image], [image], [image]}, TreeLayout -> "LayeredEmbedding"]Tree[1, {[image], [image], [image]}, TreeLayout -> {"LayeredEmbedding", LayerSizeFunction -> #}]& /@ {5&, 10&}Tree[1, {[image], [image], [image]}, TreeLayout -> {"LayeredEmbedding", "RootVertex" -> #}]& /@ {{}, {2}, {2, 2}}Tree[1, {[image], [image], [image]}, TreeLayout -> {"LayeredEmbedding", "LeafDistance" -> #}]& /@ {1, 2, 3}Tree[1, {[image], [image], [image]}, TreeLayout -> {"LayeredEmbedding", "Orientation" -> #}]& /@ {Top, Bottom, Left, Right}"LayeredDigraphEmbedding" (1)
Tree[1, {[image], [image], [image]}, TreeLayout -> "LayeredDigraphEmbedding"]Tree[1, {[image], [image], [image]}, TreeLayout -> {"LayeredDigraphEmbedding", "RootVertex" -> #}]& /@ {{}, {2}, {2, 2}}Tree[1, {[image], [image], [image]}, TreeLayout -> {"LayeredDigraphEmbedding", "Rotation" -> # * Degree}]& /@ {30, 60, 90, 120}Tree[1, {[image], [image], [image]}, TreeLayout -> {"LayeredDigraphEmbedding", "Orientation" -> #}]& /@ {Top, Bottom, Left, Right}See Also
Related Guides
History
Text
Wolfram Research (2021), TreeLayout, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeLayout.html.
CMS
Wolfram Language. 2021. "TreeLayout." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TreeLayout.html.
APA
Wolfram Language. (2021). TreeLayout. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeLayout.html
BibTeX
@misc{reference.wolfram_2026_treelayout, author="Wolfram Research", title="{TreeLayout}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/TreeLayout.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_treelayout, organization={Wolfram Research}, title={TreeLayout}, year={2021}, url={https://reference.wolfram.com/language/ref/TreeLayout.html}, note=[Accessed: 13-June-2026]}