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 settings for TreeElementCoordinates can be used:
  • Automaticautomatically compute node coordinates
    ptplace the root node at center coordinate pt
    Allptplace all nodes at center coordinate pt
    TreeCases[pattern]ptplace nodes with data matching pattern at center coordinate pt
    {pos1pt1,pos2,}place the node at relative position posi at center coordinate pti
    {patt1pt1,patt2pt2,}place the 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 all

Basic Examples  (3)

Specify coordinates for an individual node:

Specify a list of node coordinates:

Use the same coordinates for all nodes:

Scope  (1)

Position Specification  (1)

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, https://reference.wolfram.com/language/ref/TreeElementCoordinates.html.

Text

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.

APA

Wolfram Language. (2022). TreeElementCoordinates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeElementCoordinates.html

BibTeX

@misc{reference.wolfram_2024_treeelementcoordinates, author="Wolfram Research", title="{TreeElementCoordinates}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/TreeElementCoordinates.html}", note=[Accessed: 13-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_treeelementcoordinates, organization={Wolfram Research}, title={TreeElementCoordinates}, year={2022}, url={https://reference.wolfram.com/language/ref/TreeElementCoordinates.html}, note=[Accessed: 13-October-2024 ]}