AnnotationRules

AnnotationRules

is an option that allows specification of annotations to objects and items in objects.

Details

  • Typically used to specify annotations to objects and items in objects.
  • Possible objects with items that can be annotated:
  • Audiotime points and time intervals
    BoundaryMeshRegionmesh cells
    Graphvertices and edges
    MeshRegionmesh cells
  • AnnotationRules is always converted to an optimized standard form with structure.
  • The AnnotationRules option can be used to specify inheritance of annotations in constructs such as Subgraph, EdgeAdd and GraphUnion.
  • Typical settings for inheritance of annotations include:
  • Inheritedinherit all annotations
    Automaticuse automatic inheritance of annotations
    Noneset no inheritance

Examples

open allclose all

Basic Examples  (2)

Specify a cell annotation in mesh:

Retrieve the custom annotation:

Inherit all annotations of the graph:

Use automatic inheritance of annotations:

Set no inheritance:

Scope  (12)

Graphs & Networks  (12)

Graph annotations  (8)

Set annotations for vertices:

And edges:

Set annotations for the graph itself:

Set default annotations for vertices:

And edges:

AnnotationRules works with undirected graphs:

Directed graphs:

Multigraphs graphs:

Mixed graphs:

Weighted graphs:

Vertex annotations  (2)

Standard vertex annotations include VertexStyle:

VertexLabels:

VertexSize:

VertexShape:

Specify a custom annotation:

Edge annotations  (2)

Standard edge annotations include EdgeStyle:

EdgeLabels:

EdgeShapeFunction:

Specify a custom annotation:

Applications  (4)

A simple electric circuit:

Create a graph with various annotations associated with the vertices:

Options uses AnnotationRules to handle some of the annotations:

Generate an input form of the graph:

Check the result:

Use Table to set similar annotations for many items:

Use Thread when annotation values are available in lists:

Introduced in 2019
 (12.0)
 |
Updated in 2020
 (12.1)