TreeElementShape

TreeElementShape

Treeおよび関連関数のオプションで,部分木要素に使用するグラフィックスを指定する.

詳細

  • TreeElementShapeを使うと,木の根のノードの形状およびパターンにマッチする位置にある任意の部分木の形状が指定できる.
  • TreeElementShapeは,Graphicsオブジェクト,Graphics3Dオブジェクト,Imageオブジェクトのいずれでもよい.
  • オブジェクトの中心はTreeElementCoordinatesで指定されたグラフィックスの位置になる. »
  • 各部分木の描画された形はTreeElementSizeで指定されるように与えられたオブジェクトをスケールし直すことで得られる. »
  • 次は,使用可能なオプション設定である.
  • Automatic自動形状を使う
    gノードにグラフィックス g を使う »
    Allg全ノードに g を使う »
    TreeCases[pattern]gデータが pattern にマッチするノードに g を使う »
    "Leaves"g葉に g を使う »
    "NonLeaves"g葉以外に g を使う »
    {pos1g1,pos2g2,}相対位置 posiにあるノードに giを使う »
    {patt1g1,patt2g2,}パターン pattiにマッチする位置にあるノードに giを使う »
  • TreeElementShapeFunctionの指定はTreeElementShapeの指定をオーバーライドする. »

例題

すべて開くすべて閉じる

  (4)

個々のノードの形状を指定する:

ノードの形状のリストを指定する:

すべてのノードに同じ形状を使う:

葉と葉以外の形状を指定する:

スコープ  (2)

位置パターンを使って位置を指定する:

データパターンを使って位置を指定する:

特性と関係  (7)

オブジェクトの中心はTreeElementCoordinatesで指定されたグラフィックスの位置になる:

TreeElementShapeTreeElementSizeと組み合せることができる:

TreeElementShapeFunctionの指定はTreeElementShapeの指定をオーバーライドする:

ノードの形状は位置で指定できる:

部分木によって指定されたスタイルはその祖先によって指定されたスタイルよりも優先順位が高い:

部分木内の位置{i,j,}は相対的な位置{i,j,}にあるその部分木を参照する:

位置{1}における相対位置{2}は大域的位置{1,2}を参照する:

一般に,パターン pattpatt にマッチする大域的位置{i,j,}にある部分木に適用される:

パターンのリスト{patt1,patt2,}pattiにマッチする相対位置{i,j,}に適用される:

考えられる問題  (1)

TreeElementShapeは,ノードに使われるグラフィックスあるいは画像を取る:

TreeElementShapeFunctionは,グラフィックスあるいは画像を描画するためにInsetを必要とする:

Wolfram Research (2022), TreeElementShape, Wolfram言語関数, https://reference.wolfram.com/language/ref/TreeElementShape.html.

テキスト

Wolfram Research (2022), TreeElementShape, Wolfram言語関数, 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_2025_treeelementshape, author="Wolfram Research", title="{TreeElementShape}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/TreeElementShape.html}", note=[Accessed: 02-February-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_treeelementshape, organization={Wolfram Research}, title={TreeElementShape}, year={2022}, url={https://reference.wolfram.com/language/ref/TreeElementShape.html}, note=[Accessed: 02-February-2025 ]}