Annotate
Annotate[obj,keyvalue]
sets the annotation keyvalue for the object obj.
Annotate[{obj,itemspec},keyvalue]
sets the annotation for the items in obj specified by itemspec.
Details
- Typically used to store key->value pairs for an object or items in an object.
- Annotate returns the specified object with a new or modified annotation.
- 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.
Examples
open allclose allBasic Examples (2)
Scope (11)
Graph & Networks (11)
Graph annotations (7)
Set several annotations for a vertex:
Annotate works with undirected graphs:
Vertex annotations (2)
Standard vertex annotations include VertexStyle:
Non-visual annotations include VertexWeight:
Edge annotations (2)
Standard edge annotations include EdgeStyle:
Non-visual annotations include EdgeWeight:
Applications (3)
Properties & Relations (6)
Use Annotation as a wrapper to specify annotations in functions such as Graph:
Use AnnotationValue to extract values:
For undefined annotations, the value $Failed is returned:
Use AnnotationValue to set annotations in a graph:
The original graph has changed:
Use AnnotationValue to unset annotations in a graph:
The original graph has changed:
Use AnnotationKeys to test for the presence of an annotation:
Generate a list of vertex label rules:
Use AnnotationDelete to remove an annotation without changing the original:
Possible Issues (1)
AnnotationValue is typically faster than Annotate:
Text
Wolfram Research (2020), Annotate, Wolfram Language function, https://reference.wolfram.com/language/ref/Annotate.html.
CMS
Wolfram Language. 2020. "Annotate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Annotate.html.
APA
Wolfram Language. (2020). Annotate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Annotate.html