TreeElementCoordinates
✖
TreeElementCoordinates
is an option for Tree and related functions that specifies the coordinates to use to place the center of subtree elements.
Details

- TreeElementCoordinates allows specifying the coordinates 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 coordinates pt place the node at center coordinate pt » Allpt place all nodes at center coordinate pt » TreeCases[pattern]pt place nodes with data matching pattern at center coordinate pt » "Leaves"pt place leaves at center coordinate pt » "NonLeaves"pt place non-leaves at center coordinate pt » {pos1pt1,pos2pt2,…} place the node at relative position posi at center coordinate pti » {patt1pt1,patt2pt2,…} place nodes at positions matching patti at center coordinate pti » - With the setting TreeElementCoordinatesAutomatic, the center coordinates for subtree elements are computed according to the setting for TreeLayout.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Specify coordinates for an individual node:

https://wolfram.com/xid/0bh0730tyn71au-lcdyu2

Specify a list of node coordinates:

https://wolfram.com/xid/0bh0730tyn71au-i6vvbq

Use the same coordinates for all nodes:

https://wolfram.com/xid/0bh0730tyn71au-bdphq

Specify coordinates for the leaves:

https://wolfram.com/xid/0bh0730tyn71au-dra893


https://wolfram.com/xid/0bh0730tyn71au-4n1lr7

Scope (2)Survey of the scope of standard use cases
Properties & Relations (4)Properties of the function, and connections to other functions
Coordinates for nodes can be specified by position:

https://wolfram.com/xid/0bh0730tyn71au-rww2n6

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

https://wolfram.com/xid/0bh0730tyn71au-n4vthy

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

https://wolfram.com/xid/0bh0730tyn71au-g2ge37

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

https://wolfram.com/xid/0bh0730tyn71au-naunb1

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

https://wolfram.com/xid/0bh0730tyn71au-ss92qf

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

https://wolfram.com/xid/0bh0730tyn71au-9pzfuk

Wolfram Research (2022), TreeElementCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeElementCoordinates.html.
Text
Wolfram Research (2022), TreeElementCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeElementCoordinates.html.
Wolfram Research (2022), TreeElementCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeElementCoordinates.html.
CMS
Wolfram Language. 2022. "TreeElementCoordinates." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TreeElementCoordinates.html.
Wolfram Language. 2022. "TreeElementCoordinates." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TreeElementCoordinates.html.
APA
Wolfram Language. (2022). TreeElementCoordinates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeElementCoordinates.html
Wolfram Language. (2022). TreeElementCoordinates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeElementCoordinates.html
BibTeX
@misc{reference.wolfram_2025_treeelementcoordinates, author="Wolfram Research", title="{TreeElementCoordinates}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/TreeElementCoordinates.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_treeelementcoordinates, organization={Wolfram Research}, title={TreeElementCoordinates}, year={2022}, url={https://reference.wolfram.com/language/ref/TreeElementCoordinates.html}, note=[Accessed: 29-March-2025
]}