AnnotationValue
AnnotationValue[obj,key]
gives the annotation value associated with key for the object obj.
AnnotationValue[{obj,itemspec},key]
gives the annotation value associated with key for items specified by itemspec in obj.
Details
- Typically used to extract and manipulate values in annotations associated to an object or an item in an object.
- AnnotationValue gives the value value in key->value annotations for an object and its items.
- Possible objects with items that can be annotated:
-
Audio time points and time intervals BoundaryMeshRegion mesh cells Graph vertices and edges MeshRegion mesh cells - Item specification itemspec for each type of object is given in its reference page.
- Missing is returned when a name requested in AnnotationValue is not found.
- AnnotationValue[{obj,itemspec},key] returns unevaluated for the tag key without value.
- AnnotationValue[…,key]=val can be used to modify the annotation value.
Examples
open allclose allBasic Examples (3)
Generate a complete graph with annotations:
Retrieve the annotation value associated with an annotation name:
Get intrinsic MeshCellMeasure annotations for cells in a mesh:
Automatically compute annotations for an Audio object:
Scope (15)
Graphs & Networks (13)
Graph annotations (7)
Retrieve several properties from a vertex:
Unset annotations for vertices:
AnnotationValue works with undirected graphs:
Vertex annotations (3)
Standard vertex annotations include VertexStyle:
Non-visual annotations include VertexWeight:
Edge annotations (3)
Standard edge annotations include EdgeStyle:
Non-visual annotations include EdgeWeight:
Audio (2)
Annotate an Audio object:
Retrieve the annotation using AnnotationValue:
Annotate an Audio object using AudioAnnotate:
Retrieve multiple annotations using AnnotationValue:
Applications (5)
Use Do to set several annotation values:
Or different annotation values for different items:
Use Table to build a list of annotation values:
Set the edge thickness to reflect the edge weight:
Highlight a path and mark the start point and endpoint:
Highlight by setting edge style along the path and vertex labels for start point and endpoint:
Dynamically highlight the edges in the order given by EdgeList:
Properties & Relations (5)
Use Annotation as a wrapper to specify annotations in functions such as Graph:
AnnotationValue returns $Failed for undefined annotations:
Use AnnotationKeys to test for the presence of an annotation:
Generate a list of vertex label rules:
Use Annotate to set an annotation without changing the original:
The original graph is unchanged:
Use AnnotationDelete to remove an annotation without changing the original:
Possible Issues (2)
AnnotationValue returns $Failed for undefined annotations:
Use AnnotationKeys to test for the presence of an annotation:
AnnotationValue may return $Failed even when an annotation value exists:
Use AnnotationKeys to check for actual annotation values:
Text
Wolfram Research (2020), AnnotationValue, Wolfram Language function, https://reference.wolfram.com/language/ref/AnnotationValue.html.
CMS
Wolfram Language. 2020. "AnnotationValue." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AnnotationValue.html.
APA
Wolfram Language. (2020). AnnotationValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AnnotationValue.html