is an option for Tree and related functions that specifies what size should be used for subtree elements.


TreeElementSize
is an option for Tree and related functions that specifies what size should be used for subtree elements.
Details

- TreeElementSize allows specifying the size of the root node of a tree, as well as that of any subtrees at positions matching a pattern.
- The following option settings can be used:
-
Automatic automatically compute node size Tiny,Small,Medium,Large use tiny, small, etc. sizes » {"Nearest",s} fraction of minimum distance between node coordinates » {"Scaled",s} fraction of overall diagonal for all node coordinates » {sx,sy} specify size in the and
directions »
Alls use size s for all nodes » TreeCases[pattern]s use s for nodes with data matching pattern » "Leaves"s use s for leaves » "NonLeaves"s use s for non-leaves » {pos1s1,pos2s2,…} use si for the node at relative position posi » {patt1s1,patt2s2,…} use si for nodes at positions matching patti » - TreeElementSizes for a number s is taken to be TreeElementSize{"Nearest",s}.
- A size {sx,sy} indicates a rectangle region with center {x,y}, lower-left corner {x-sx,y-sy} and upper-right corner {x+sx,y+sy}.
- TreeElementSizeFunction specifications override TreeElementSize specifications.
Examples
open all close allBasic Examples (4)
Scope (6)
Size Specification (4)
Properties & Relations (4)
Sizes for nodes can be specified by position:
Sizes specified by a subtree take precedence over sizes specified by its ancestors:
A position {i,j,…} in a subtree refers to its subtree at relative position {i,j,…}:
A relative position {2} at position {1} refers to the global position {1,2}:
In general, a pattern patt applies to subtrees at global positions {i,j,…} that match patt:
A list of patterns {patt1,patt2,…} applies to relative positions {i,j,…} that match patti:
Related Guides
History
Text
Wolfram Research (2022), TreeElementSize, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeElementSize.html.
CMS
Wolfram Language. 2022. "TreeElementSize." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TreeElementSize.html.
APA
Wolfram Language. (2022). TreeElementSize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeElementSize.html
BibTeX
@misc{reference.wolfram_2025_treeelementsize, author="Wolfram Research", title="{TreeElementSize}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/TreeElementSize.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_treeelementsize, organization={Wolfram Research}, title={TreeElementSize}, year={2022}, url={https://reference.wolfram.com/language/ref/TreeElementSize.html}, note=[Accessed: 13-August-2025]}