lists all annotation keys available for the object obj.


lists all annotation keys available for the items specified by itemspec in obj.


  • Typically used to extract names in annotations associated to an object and items in an object.
  • AnnotationKeys gives the list of all names keys in key->value annotations for an object and its items.
  • Possible objects with annotations include:
  • Audioaudio with time and duration
    BoundaryMeshRegionboundary mesh with cells
    Graphgraph with vertices and edges
    MeshRegionmesh region with cells
  • Item specification itemspec for each object obj is given in its reference page.
  • Option names associated with an object obj are standard annotations for obj except AnnotationRules.


open allclose all

Basic Examples  (3)

Get a list of standard annotations in a graph:

For a vertex:

For an edge:

Test for the presence of MeshCellMarker annotations in cells of dimension 1:

Get the marker of the cell with index {1,1}:

Automatically compute annotations for an Audio object:

Retrieve annotations for louder intervals:

Scope  (1)

Graphs & Networks  (1)

AnnotationKeys applies to vertices:

And edges:

AnnotationKeys works with undirected graphs:

Directed graphs:

Multigraphs graphs:

Mixed graphs:

Weighted graphs:

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 Annotate to set the annotations in a new graph:

The original graph is unchanged:

Use AnnotationDelete to remove a annotation without changing the original:

The original graph is unchanged:

Introduced in 2020