RulesTree

RulesTree[data{rule1,rule2,}]

gives a tree whose root contains data and that has children specified by the rulei.

Details

Examples

open allclose all

Basic Examples  (2)

Construct a tree with three leaves:

Construct a tree with several levels:

Scope  (2)

Construct a tree with one node:

Specify a list of children:

Options  (9)

Styling Individual Tree Elements  (2)

Specify the label for the generated tree element:

Specify labels and styles for subtrees by position:

Styling Entire Tree  (4)

Specify labels and styles for all subtrees:

Specify the base style:

Specify the styles for the edges and the edges of the tree elements:

Specify the base style and styles for individual tree elements:

Tree Layout and Graphics Options  (3)

Specify the orientation for the root:

Specify a named embedding:

Specify Graphics options:

Properties & Relations  (2)

RulesTree constructs a tree associated with the given rules:

Use TreeRules on the result to recover the original rules:

RulesTree can be computed with NestTree:

Possible Issues  (1)

RulesTree[expr{}] is generally equivalent to RulesTree[expr]:

However, the empty list is necessary to specify a tree with data of the form lhs{e1,e2,}:

Without the empty list, this would be treated as a tree whose root contains lhs with children {RulesTree[e1],RulesTree[e2],}:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2021_rulestree, author="Wolfram Research", title="{RulesTree}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/RulesTree.html}", note=[Accessed: 24-May-2022 ]}

BibLaTeX

@online{reference.wolfram_2021_rulestree, organization={Wolfram Research}, title={RulesTree}, year={2021}, url={https://reference.wolfram.com/language/ref/RulesTree.html}, note=[Accessed: 24-May-2022 ]}