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 allclose allBasic Examples (4)Summary of the most common use cases
Specify an individual node size:

https://wolfram.com/xid/0gfre02xeg46-spud1u


https://wolfram.com/xid/0gfre02xeg46-jcn0nw

Use the same size for all nodes:

https://wolfram.com/xid/0gfre02xeg46-vjxear

Specify sizes for the leaves and for the non-leaves:

https://wolfram.com/xid/0gfre02xeg46-zvx9qs

Scope (6)Survey of the scope of standard use cases
Size Specification (4)

https://wolfram.com/xid/0gfre02xeg46-pj1uve

Use a fraction of the minimum distance between node coordinates:

https://wolfram.com/xid/0gfre02xeg46-f7qm71

Use a fraction of the overall diagonal for all node coordinates:

https://wolfram.com/xid/0gfre02xeg46-er9w11

Specify size in both the and
directions:

https://wolfram.com/xid/0gfre02xeg46-vxga6i

Properties & Relations (4)Properties of the function, and connections to other functions
Sizes for nodes can be specified by position:

https://wolfram.com/xid/0gfre02xeg46-d18tjh

Sizes specified by a subtree take precedence over sizes specified by its ancestors:

https://wolfram.com/xid/0gfre02xeg46-0asve

A position {i,j,…} in a subtree refers to its subtree at relative position {i,j,…}:

https://wolfram.com/xid/0gfre02xeg46-l2ckql

A relative position {2} at position {1} refers to the global position {1,2}:

https://wolfram.com/xid/0gfre02xeg46-1660le

In general, a pattern patt applies to subtrees at global positions {i,j,…} that match patt:

https://wolfram.com/xid/0gfre02xeg46-gx01w6

A list of patterns {patt1,patt2,…} applies to relative positions {i,j,…} that match patti:

https://wolfram.com/xid/0gfre02xeg46-y3bjj5

Wolfram Research (2022), TreeElementSize, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeElementSize.html.
Text
Wolfram Research (2022), TreeElementSize, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeElementSize.html.
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.
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
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: 01-June-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: 01-June-2025
]}