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


  • 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 settings for TreeElementCoordinates can be used:
  • Automaticautomatically compute subtree element coordinates
    {pos1pt1,pos2,}place the subtree element at position posi at center coordinate pti
    {patt1pt1,patt2pt2,}place the subtree elements 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.
  • In TreeElementCoordinates, Allpt uses pt for all subtrees.
  • In TreeElementCoordinates, TreeCases[pattern]pt uses pt for all subtrees with data matching pattern.


open allclose all

Basic Examples  (4)

Specify coordinates for an individual subtree element:

Specify all subtree element coordinates:

Use the same coordinates for all subtree elements:

Specify positions using position patterns:

Specify positions using data patterns:

Properties & Relations  (4)

Coordinates for subtree elements 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:

Wolfram Research (2022), TreeElementCoordinates, Wolfram Language function,


Wolfram Research (2022), TreeElementCoordinates, Wolfram Language function,


Wolfram Language. 2022. "TreeElementCoordinates." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2022). TreeElementCoordinates. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_treeelementcoordinates, author="Wolfram Research", title="{TreeElementCoordinates}", year="2022", howpublished="\url{}", note=[Accessed: 29-May-2024 ]}


@online{reference.wolfram_2024_treeelementcoordinates, organization={Wolfram Research}, title={TreeElementCoordinates}, year={2022}, url={}, note=[Accessed: 29-May-2024 ]}