TreeElementShape

TreeElementShape

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

Details

  • TreeElementShape allows specifying the shape of the root node of a tree, as well as that of any subtree at positions matching a pattern.
  • TreeElementShape can be any Graphics, Graphics3D or Image object.
  • The center of the object lies at the position in the graphic specified by TreeElementCoordinates. »
  • The rendered form of each subtree element is obtained by rescaling the given object as specified by TreeElementSize. »
  • The following option settings can be used:
  • Automaticuse the automatic setting for a shape
    guse the graphic g for the root node
    Allguse g for all nodes
    TreeCases[pattern]guse g for the nodes with data matching the pattern pattern
    {pos1g1,pos2g2,}use gi for the node at relative position posi
    {patt1g1,patt2g2,}use gi for the node at positions matching the pattern patti
  • TreeElementShapeFunction specifications override TreeElementShape specifications. »

Examples

open allclose all

Basic Examples  (3)

Specify an individual node shape:

Specify a list of node shapes:

Use the same shape for all nodes:

Scope  (1)

Position Specification  (1)

Specify positions using position patterns:

Specify positions using data patterns:

Properties & Relations  (7)

The center of the object lies at the position in the graphic specified by TreeElementCoordinates:

TreeElementShape can be combined with TreeElementSize:

TreeElementShapeFunction specifications override TreeElementShape specifications:

Shapes for subtree elements can be specified by position:

Styles specified by a subtree take precedence over styles 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 the patti:

Wolfram Research (2022), TreeElementShape, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeElementShape.html.

Text

Wolfram Research (2022), TreeElementShape, Wolfram Language function, https://reference.wolfram.com/language/ref/TreeElementShape.html.

CMS

Wolfram Language. 2022. "TreeElementShape." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TreeElementShape.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_treeelementshape, organization={Wolfram Research}, title={TreeElementShape}, year={2022}, url={https://reference.wolfram.com/language/ref/TreeElementShape.html}, note=[Accessed: 21-November-2024 ]}