AnnotationKeys[obj]
obj について使用可能なすべての注釈キーを与える.
AnnotationKeys[{obj,itemspec}]
obj 内の itemspec で指定された項目についての使用可能なすべての注釈キーをリストする.
AnnotationKeys
AnnotationKeys[obj]
obj について使用可能なすべての注釈キーを与える.
AnnotationKeys[{obj,itemspec}]
obj 内の itemspec で指定された項目についての使用可能なすべての注釈キーをリストする.
詳細
- オブジェクトおよびオブジェクト内の項目に関連付けられた注釈内の名前を抽出するために使われることが多い.
- AnnotationKeysは,オブジェクトおよびその項目についての key->value 注釈内のすべての名前 keys のリストを与える.
- 次は,注釈がある可能性があるオブジェクトである.
-
Audio 時点と時間継続がある音声 BoundaryMeshRegion セルの境界メッシュ CSGRegion 幾何学領域 Graph 頂点と辺があるグラフ MeshRegion セルのメッシュ領域 - 各オブジェクト obj iについての項目指定 itemspec は該当する関数ページを参照のこと.
- オブジェクト obj に関連付けられたオプション名は,AnnotationRulesを除く obj についての標準的な注釈である.
例題
すべて開く すべて閉じる例 (3)
g = ExampleData[{"NetworkGraph", "FlorentineFamilies"}]AnnotationKeys[g]AnnotationKeys[{g, "Medici"}]AnnotationKeys[{g, "Medici""Ridolfi"}]一次元のセルにMeshCellMarker注釈があるかどうかを調べる:
mr = MengerMesh[2, MeshCellMarker -> {{1, 1} -> 1, {1, 2} -> 2, {1, 3} -> 3}]MemberQ[AnnotationKeys[{mr, 1}], MeshCellMarker]AnnotationValue[{mr, {1, 1}}, MeshCellMarker]Audioオブジェクトの注釈を自動的に計算する:
a = AudioAnnotate[Import["ExampleData/rule30.wav"], "Loud"];AnnotationKeys[a]AnnotationValue[a, "Loud"]スコープ (8)
グラフとネットワーク (6)
AnnotationKeysは頂点に適用される:
Graph[{Annotation[1, {VertexWeight -> 4, "Material" -> "Wood"}], 2, 3}, {12, 23, 31}]AnnotationKeys[{%, 1}]Graph[{1, 2, 3}, {Annotation[12, EdgeLabels -> "hello"], 23, 31}]AnnotationKeys[{%, 12}]AnnotationKeysは無向グラフに使うことができる:
CycleGraph[5, VertexShapeFunction -> "Name"];AnnotationKeys[{[image], 12}]CycleGraph[5, DirectedEdges -> True, EdgeStyle -> Arrowheads[Small], VertexShapeFunction -> "Name"];AnnotationKeys[{[image], 12}]Module[{g},
g = Graph[Range[5], {12, 15, 23, 34, 45, 45, 45}, VertexCoordinates -> GraphEmbedding[CycleGraph[5]], VertexShapeFunction -> "Name", PerformanceGoal -> "Quality"];
MapThread[(AnnotationValue[{g, #1}, EdgeStyle] = #2)&, {EdgeList[g], {Gray, Blue, Red, Green, Brown, Brown, Brown}}];
g]AnnotationKeys[{%, 34}]Module[{g},
g = Graph[Range[5], {12, 15, 23, 34, 45}, VertexCoordinates -> GraphEmbedding[CycleGraph[5]], VertexShapeFunction -> "Name", PerformanceGoal -> "Quality"];
MapThread[(AnnotationValue[{g, #1}, EdgeStyle] = #2)&, {EdgeList[g], {Gray, Blue, Red, Green, Brown}}];
g]AnnotationKeys[{%, 15}]With[{g = CycleGraph[5], w = 0.3Range[5],
pl = {Right, Above, Above, Right, Above} /. {Right -> {1 / 2, {-0.4, 1 / 2}}, Above -> {1 / 2, {1 / 2, 0}}}},
Graph[VertexList[g], EdgeList[g], EdgeWeight -> w, VertexShapeFunction -> "Name", EdgeLabels -> Thread[EdgeList[g] -> MapThread[Placed, {w, pl}]], VertexCoordinates -> GraphEmbedding[g]]];AnnotationKeys[{[image], 12}]領域 (2)
AnnotationKeysはCSGRegionオブジェクトに適用される:
CSGRegion["Union", {Ball[], Cuboid[]}]AnnotationKeys[%]CSGRegion["Union", {Ball[], Cuboid[]}]AnnotationKeys[{%, {1}}]AnnotationKeysは,標準およびユーザ定義両方の注釈キーを返す:
CSGRegion["Union", {Annotation[Ball[], "Material" -> "Wood"], Cuboid[]}]AnnotationKeys[{%, {1}}]特性と関係 (6)
Annotationをラッパーとして使ってGraph等の関数における注釈を指定する:
Graph[{Annotation[1, {VertexSize -> Medium, VertexStyle -> Red}], 2, 3}, {12, 23, 31}]AnnotationValueを使って値を抽出する:
g = CompleteGraph[4, VertexStyle -> {1 -> Red}, VertexSize -> Small]AnnotationValue[{g, 1}, VertexStyle]未定義の注釈に対しては値$Failedが返される:
AnnotationValue[{g, 1}, "foo"]MemberQ[AnnotationKeys[{g, 1}], "foo"]AnnotationValueを使ってグラフ内に注釈を設定する:
g = CompleteGraph[4]AnnotationValue[{g, 1}, VertexSize] = Small;gAnnotationValueを使ってグラフ内の注釈の設定を解除する:
g = CompleteGraph[4, VertexSize -> {1 -> Small}]AnnotationValue[{g, 1}, VertexSize]=.;gAnnotateを使って新規グラフ内の注釈を設定する:
g = CompleteGraph[4]Annotate[{g, 1}, VertexSize -> Small]gAnnotationDeleteを使ってもとのグラフを変えずに注釈を削除する:
g = CompleteGraph[4, VertexSize -> {1 -> Small}]AnnotationDelete[{g, 1}, VertexSize]g関連するガイド
-
▪
- 音声計算 ▪
- グラフのアノテーション ▪
- アノテーション
テキスト
Wolfram Research (2020), AnnotationKeys, Wolfram言語関数, https://reference.wolfram.com/language/ref/AnnotationKeys.html (2025年に更新).
CMS
Wolfram Language. 2020. "AnnotationKeys." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/AnnotationKeys.html.
APA
Wolfram Language. (2020). AnnotationKeys. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AnnotationKeys.html
BibTeX
@misc{reference.wolfram_2026_annotationkeys, author="Wolfram Research", title="{AnnotationKeys}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/AnnotationKeys.html}", note=[Accessed: 04-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_annotationkeys, organization={Wolfram Research}, title={AnnotationKeys}, year={2025}, url={https://reference.wolfram.com/language/ref/AnnotationKeys.html}, note=[Accessed: 04-September-2026]}