AnnotationKeys

AnnotationKeys[obj]

lists all annotation keys available for the object obj.

AnnotationKeys[{obj,itemspec}]

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

Details

  • 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.

Examples

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  (6)

Graphs & Networks  (6)

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 an annotation without changing the original:

The original graph is unchanged:

Wolfram Research (2020), AnnotationKeys, Wolfram Language function, https://reference.wolfram.com/language/ref/AnnotationKeys.html.

Text

Wolfram Research (2020), AnnotationKeys, Wolfram Language function, https://reference.wolfram.com/language/ref/AnnotationKeys.html.

CMS

Wolfram Language. 2020. "AnnotationKeys." Wolfram Language & System Documentation Center. Wolfram Research. 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_2024_annotationkeys, author="Wolfram Research", title="{AnnotationKeys}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/AnnotationKeys.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_annotationkeys, organization={Wolfram Research}, title={AnnotationKeys}, year={2020}, url={https://reference.wolfram.com/language/ref/AnnotationKeys.html}, note=[Accessed: 21-December-2024 ]}