VGL Guide — Metagraph (visualizing a notation)
Estimated reading time: 1 minutes.
Metagraph (visualizing a notation)
A metagraph declaration renders the structure of a notation itself as a diagram. Because a notation is a graph (its NodeTypes are vertices and its EdgeTypes are edges), it can be visualized directly — useful for documentation, teaching, and seeing how a vnotation you just defined will actually look.
Syntax:
metagraph <NotationName> ["<optional_label>"]
- No id, no body — just the notation name and an optional label.
- If the label is omitted, it defaults to
"<NotationName> Meta Model". - A file contains either one
vgraphor onemetagraph(not both). vnotationblocks may precede ametagraph, so you can declare and visualize a custom notation in one file.- Each node in the result is styled exactly as it would appear in a real diagram using that notation — the metagraph is self-documenting.
Example — built-in notation:
metagraph Timeline
Renders the Timeline notation's structure: TimePoint and Event nodes connected by sequence and influence edges, styled as Timeline styles them.
Example — custom label:
metagraph ConceptMap "How ConceptMaps are built"
Example — user-defined notation:
vnotation MyNotation extends ConceptMap {
node type: Hypothesis [nodeStyle: iconWithText; icon: lightbulb.fill]
edge type: supports from: Hypothesis to: Concept
}
metagraph MyNotation
Renders the full structure of MyNotation — inherited ConceptMap types plus the new Hypothesis node type and supports edge type.
Home