TreeElementSize

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:
  • Automaticautomatically compute node size
    Tiny,Small,Medium,Largeuse 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 »
    Allsuse size s for all nodes »
    TreeCases[pattern]suse s for nodes with data matching pattern »
    "Leaves"suse s for leaves »
    "NonLeaves"suse 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 all

Basic Examples  (4)

Specify an individual node size:

Specify a list of node sizes:

Use the same size for all nodes:

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

Scope  (6)

Size Specification  (4)

Use symbolic node sizes:

Use a fraction of the minimum distance between node coordinates:

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

Specify size in both the and directions:

Position Specification  (2)

Specify positions using position patterns:

Specify positions using data patterns:

Properties & Relations  (4)

Sizes for nodes 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), 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.

CMS

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

BibTeX

@misc{reference.wolfram_2024_treeelementsize, author="Wolfram Research", title="{TreeElementSize}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/TreeElementSize.html}", note=[Accessed: 20-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_treeelementsize, organization={Wolfram Research}, title={TreeElementSize}, year={2022}, url={https://reference.wolfram.com/language/ref/TreeElementSize.html}, note=[Accessed: 20-January-2025 ]}