オブジェクトおよびオブジェクトの項目についての注釈指定を許可するオプションである.
AnnotationRules
オブジェクトおよびオブジェクトの項目についての注釈指定を許可するオプションである.
詳細
- オブジェクトおよびオブジェクト内の項目の注釈を指定するためによく使われる.
- 次は,注釈が付けられる項目がある可能性があるオブジェクトである.
-
Audio 時点と時間間隔 BoundaryMeshRegion メッシュセル CSGRegion 幾何学領域 Graph 頂点と辺 MeshRegion メッシュセル - AnnotationRulesは,常に構造を持つ最適化された標準形式に常に変換される.
- AnnotationRulesオプションを使って,Subgraph,EdgeAdd,GraphUnion等の構造における注釈の継承が指定できる.
- 次は,注釈の継承によく使われる設定である.
-
Inherited すべての注釈を継承する Automatic 注釈の自動継承を使う None 継承は設定しない
例題
すべて開く すべて閉じる例 (2)
mr = MengerMesh[1, AnnotationRules -> {{2, 1} -> {"marker" -> 1}}];AnnotationValue[{mr, {2, 1}}, "marker"]graph = [image];Subgraph[graph, {28, 38, 48, 27, 37, 47, 26, 36, 46}, AnnotationRules -> Inherited]Subgraph[graph, {28, 38, 48, 27, 37, 47, 26, 36, 46}, AnnotationRules -> Automatic]Subgraph[graph, {28, 38, 48, 27, 37, 47, 26, 36, 46}, AnnotationRules -> None]スコープ (12)
グラフとネットワーク (12)
グラフの注釈 (8)
Graph[{12, 23, 31}, AnnotationRules -> {1 -> {VertexLabels -> "hello"}}]Graph[{12, 23, 31}, AnnotationRules -> {12 -> {EdgeLabels -> "hello"}}]Graph[{12, 23, 31}, AnnotationRules -> {"GraphProperties" -> {"Message" -> "hello"}}]AnnotationValue[%, "Message"]Graph[{12, 23, 31}, AnnotationRules -> {"DefaultVertexProperties" -> {VertexStyle -> Red}}, VertexSize -> Small]Graph[{12, 23, 31}, AnnotationRules -> {"DefaultEdgeProperties" -> {EdgeStyle -> Dashed}}]AnnotationRulesは無向グラフに使うことができる:
Graph[{1, 2, 3}, {12, 23, 31}, AnnotationRules -> {12 -> {EdgeStyle -> Brown}}]Graph[{1, 2, 3}, {12, 23, 31}, AnnotationRules -> {12 -> {EdgeStyle -> Dashed}}, EdgeStyle -> Arrowheads[Small]]Graph[{1, 2, 3}, {12, 23, 23, 23, 31}, AnnotationRules -> {12 -> {EdgeStyle -> Brown}}]Graph[{1, 2, 3}, {12, 23, 31}, AnnotationRules -> {12 -> {EdgeStyle -> Dashed}}, EdgeStyle -> Arrowheads[0.08]]Graph[{1, 2, 3}, {12, 23, 31}, EdgeWeight -> {0.5, 1, 1}, AnnotationRules -> {12 -> {EdgeStyle -> Dashed}}]頂点の注釈 (2)
標準的な頂点の注釈にはVertexStyleが含まれる:
Graph[{12, 23, 31}, AnnotationRules -> {1 -> {VertexStyle -> Red}}]Graph[{12, 23, 31}, AnnotationRules -> {1 -> {VertexLabels -> "hello"}}]Graph[{12, 23, 31}, AnnotationRules -> {1 -> {VertexSize -> Small}}]Graph[{12, 23, 31}, VertexSize -> Medium, AnnotationRules -> {1 -> {VertexShape -> [image]}}]Graph[{12, 23, 31}, AnnotationRules -> {1 -> {"Material" -> "Wood"}}]AnnotationValue[{%, 1}, "Material"]辺の注釈 (2)
標準的な辺の注釈にはEdgeStyleが含まれる:
Graph[{12, 23, 31}, AnnotationRules -> {12 -> {EdgeStyle -> Brown}}]Graph[{12, 23, 31}, AnnotationRules -> {12 -> {EdgeLabels -> "hello"}}]Graph[{12, 23, 31}, AnnotationRules -> {12 -> {EdgeShapeFunction -> "DashedLine"}}]Graph[{12, 23, 31}, AnnotationRules -> {12 -> {"Resistance" -> 50.}}]AnnotationValue[{%, 12}, "Resistance"]アプリケーション (4)
Graph[{1, 2, 3, 4, 5, 6}, {41, 12, 23, 25, 36, 45, 56}, AnnotationRules -> {41 -> {EdgeLabels -> "Voltage source"}, 12 -> {EdgeLabels -> "Resistance"},
23 -> {EdgeLabels -> "Inductance"},
25 -> {EdgeLabels -> "Capactitance"},
36 -> {EdgeLabels -> "Bulb"},
45 -> {EdgeLabels -> "Wire"},
56 -> {EdgeLabels -> "Wire"}}, GraphLayout -> "SpringEmbedding", VertexSize -> 0, ImagePadding -> {{30, 10}, {5, 5}}]g = Graph[{Annotation[1, {VertexWeight -> 42, VertexLabels -> "hello"}], Annotation[2, {"Material" -> "Wood", VertexStyle -> Green}], Annotation[3, VertexSize -> Medium]}, {12, 23, Annotation[31, EdgeStyle -> Dashed]}]OptionsはAnnotationRulesを使って注釈のいくつかを処理する:
Options[g]Graph@@@HoldForm[Evaluate[{VertexList[g], EdgeList[g], Options[g]}]]ReleaseHold[%]% == gTableを使って多くの項目に同じような注釈を設定する:
CycleGraph[15, AnnotationRules -> Table[v -> {VertexSize -> 0.2 + 0.2Mod[v, 5], VertexStyle -> Hue[(v/15), 1, 1]}, {v, 15}]]注釈の値がリストとして使用できる場合はThreadを使う:
values = {{Small, Green}, {Small, White}, {Small, Green}, {Medium, Red}, {Medium, Green}, {Medium, White}};CycleGraph[6, AnnotationRules -> Table[v -> Thread[{VertexSize, VertexStyle} -> values[[v]]], {v, 6}]]関連するガイド
-
▪
- 音声表現 ▪
- 音声解析 ▪
- グラフのアノテーション ▪
- アノテーション
テキスト
Wolfram Research (2019), AnnotationRules, Wolfram言語関数, https://reference.wolfram.com/language/ref/AnnotationRules.html (2025年に更新).
CMS
Wolfram Language. 2019. "AnnotationRules." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/AnnotationRules.html.
APA
Wolfram Language. (2019). AnnotationRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AnnotationRules.html
BibTeX
@misc{reference.wolfram_2026_annotationrules, author="Wolfram Research", title="{AnnotationRules}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/AnnotationRules.html}", note=[Accessed: 16-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_annotationrules, organization={Wolfram Research}, title={AnnotationRules}, year={2025}, url={https://reference.wolfram.com/language/ref/AnnotationRules.html}, note=[Accessed: 16-September-2026]}