sets the annotation keyvalue for the object obj.


sets the annotation for the items in obj specified by itemspec.


  • 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:
  • Audiotime points and time intervals
    BoundaryMeshRegionmesh cells
    Graphvertices and edges
    MeshRegionmesh cells
  • Item specification itemspec for each type of object is given in its reference page.


open allclose all

Basic Examples  (2)

Specify a vertex or edge annotation:

To label a vertex:

To style an edge:

Highlight boundary cells in a mesh:

Scope  (11)

Graph & Networks  (11)

Graph annotations  (7)

Set annotations for vertices:

And edges:

Set several annotations for a vertex:

And for an edge:

Annotate works with undirected graphs:

Directed graphs:

Multigraphs graphs:

Mixed graphs:

Weighted graphs:

Vertex annotations  (2)

Standard vertex annotations include VertexStyle:





Non-visual annotations include VertexWeight:

Set a custom annotation:

Edge annotations  (2)

Standard edge annotations include EdgeStyle:



Non-visual annotations include EdgeWeight:

Set a custom annotation:

Applications  (3)

Use Fold to apply Annotate repeatedly:

See all the partial results:

Create a graph:

Temporarily highlight one vertex:

Then another:

Highlight the edges visited during a breadth-first scan:

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:

The original graph is unchanged:

Possible Issues  (1)

AnnotationValue is typically faster than Annotate:

Wolfram Research (2020), Annotate, Wolfram Language function,


Wolfram Research (2020), Annotate, Wolfram Language function,


Wolfram Language. 2020. "Annotate." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2020). Annotate. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_annotate, author="Wolfram Research", title="{Annotate}", year="2020", howpublished="\url{}", note=[Accessed: 17-July-2024 ]}


@online{reference.wolfram_2024_annotate, organization={Wolfram Research}, title={Annotate}, year={2020}, url={}, note=[Accessed: 17-July-2024 ]}