Vithanco

VGL Guide — Metagraph (visualising a notation)

Estimated reading time: 1 minutes.

Metagraph (visualising a notation)

A notation is a graph — its node types are vertices and its edge types are edges — so it can be drawn directly. That is useful for documentation, for teaching, and for seeing how a vnotation you just wrote will actually look.

metagraph <NotationName> ["<optional_label>"]

No id and no body. The label defaults to "<NotationName> Meta Model". A file contains either one vgraph or one metagraph, never both, and vnotation blocks may precede a metagraph — so you can declare and visualise a custom notation in one file.

Each node is styled exactly as it would appear in a real diagram, which is what makes the metagraph self-documenting.

metagraph Timeline
vnotation MyNotation extends ConceptMap {
    node type: Hypothesis [nodeStyle: iconWithText; icon: lightbulb.fill]
    edge type: supports from: Hypothesis to: Concept
}
metagraph MyNotation