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:

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

Text

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

CMS

Wolfram Language. 2019. "AnnotationRules." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/AnnotationRules.html.

APA

Wolfram Language. (2019). AnnotationRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AnnotationRules.html

BibTeX

@misc{reference.wolfram_2024_annotationrules, author="Wolfram Research", title="{AnnotationRules}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/AnnotationRules.html}", note=[Accessed: 05-December-2024 ]}

BibLaTeX

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