MaxDisplayedChildren
is an option for Tree and related functions that specifies the maximum number of children that should be displayed for each subtree.
Details
- MaxDisplayedChildren allows the children of the root node of a tree to be elided, as well as those of any subtrees at positions matching a pattern.
- The following option settings can be used:
-
Automatic display the default number of children m display m children at the root node Allm display m children at all nodes TreeCases[pattern]m display m children at nodes with data matching pattern {pos1m1,pos2m2,…} display mi children at relative position posi {patt1m1,patt2m2,…} display mi children at positions matching patti - The global variable $MaxDisplayedChildren gives the default number of children for all nodes.
Examples
open allclose allBasic Examples (3)
Scope (1)
Properties & Relations (6)
Ten children are displayed by default:
Setting $MaxDisplayedChildren=m specifies the default number of children to display for the option setting MaxDisplayedChildrenAutomatic:
Maximum children for nodes can be specified by position:
Specify the maximum number of children for a tree:
Maximum children specified by a subtree take precedence over those 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:
Text
Wolfram Research (2022), MaxDisplayedChildren, Wolfram Language function, https://reference.wolfram.com/language/ref/MaxDisplayedChildren.html.
CMS
Wolfram Language. 2022. "MaxDisplayedChildren." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MaxDisplayedChildren.html.
APA
Wolfram Language. (2022). MaxDisplayedChildren. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MaxDisplayedChildren.html