ParentEdgeLabel

ParentEdgeLabel

is an option for Tree and related functions that specifies what labels should be used for edges.

Details

  • ParentEdgeLabel allows specifying the label of the parent edge 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:
  • Automaticuse the keys of associations as the labels
    Noneuse no label
    lbllabel the edge with lbl
    {pos1lbl1,pos2lbl2,}label the edge at position posi with lbli
    {patt1lbl1,patt2lbl2,}label edges at positions matching patti with lbli
  • Any expression can be used as a label.
  • Placed[lbl,p] can be used to place labels along an edge.
  • The following placement specifications p can be used for Placed in positioning edge labels:
  • Tooltip,StatusAreashow as tooltip or in status area on mouseover
    "Start","Middle","End"place label at start, middle or end
    {Left,pos},{Right,pos}place label left or right of the edge at symbolic position
    {s,{lx,ly}}scaled position {lx,ly} in the label at scaled position s along the edge
  • The scaled position along the edge curve represents the fraction of the total length: e.g. places the edge label at the halfway point.
  • Edge label specifications are effectively applied in the order ParentEdgeLabel, ParentEdgeLabelStyle and ParentEdgeLabelFunction, with later specifications overriding earlier ones.
  • In ParentEdgeLabel, Alllbl uses lbl for all subtrees.
  • In ParentEdgeLabel, TreeCases[pattern]lbl uses lbl for all subtrees with data matching pattern.

Examples

open allclose all

Basic Examples  (3)

Label an individual edge:

Specify a list of edge labels:

Use no edge labels:

Scope  (6)

Label Placement  (5)

Place a label along the edge:

Use Placed with symbolic locations to control label placement along an edge:

Use explicit coordinates to place labels:

Place multiple labels using Placed:

Any number of labels can be used:

Use labeling through Tooltip and StatusArea:

Label Specification  (1)

Specify positions using position patterns:

Specify positions using data patterns:

Properties & Relations  (5)

Edges are automatically labeled with the keys of an association of children:

No labels are used for a list of children:

Labels for edges can be specified by position:

Labels specified by a subtree take precedence over labels 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), ParentEdgeLabel, Wolfram Language function, https://reference.wolfram.com/language/ref/ParentEdgeLabel.html.

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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