# lilaq-project/lilaq architecture

> Architecture diagram of the GitHub repository lilaq-project/lilaq, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lilaq-project/lilaq
- Repository: https://github.com/lilaq-project/lilaq

## Overview

Lilaq is a plotting library for Typst. The documented user workflow is importing it into a Typst document and using it to create plots; README demos establish capabilities including line, scatter, bar, statistical, vector, and color-mapped plots, plus secondary axes. The source tree supports identifying the library’s plotting, model, logic, style, and algorithm layers, but no source excerpts were provided, so internal call relationships are omitted.

Main entry points: [`src/lilaq.typ`](https://github.com/lilaq-project/lilaq/blob/main/src/lilaq.typ) (Lilaq Library), [`src/model/diagram.typ`](https://github.com/lilaq-project/lilaq/blob/main/src/model/diagram.typ) (Diagram)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plotting["Plot Types"]
  node_plots["Plot Functions"]
end

subgraph group_model["Diagram Model"]
  node_diagram["Diagram<br/>[diagram.typ]"]
  node_axes["Axes and Ticks<br/>[axis.typ]"]
  node_annotations["Labels and Legends<br/>[label.typ]"]
  node_colorbar["Colorbar<br/>[colorbar.typ]"]
end

subgraph group_logic["Plot Logic"]
  node_coordinates["Coordinate Processing"]
  node_scales["Scales and Transforms<br/>[scale.typ]"]
  node_ticks["Tick Location and Format<br/>[tick-locate.typ]"]
  node_time["Date and Time<br/>[time.typ]"]
  node_data_input["Text Data Loading<br/>[txt.typ]"]
end

subgraph group_presentation["Styling and Algorithms"]
  node_styles["Style Processing<br/>[process-styles.typ]"]
  node_colors["Color and Cycles<br/>[color.typ]"]
  node_algorithms["Plot Algorithms"]
end

node_typst_author(("Typst Author"))
node_lilaq["Lilaq Library<br/>[lilaq.typ]"]

node_typst_author -->|"imports"| node_lilaq
node_lilaq -->|"creates plots"| node_diagram

click node_lilaq "https://github.com/lilaq-project/lilaq/blob/main/src/lilaq.typ"
click node_plots "https://github.com/lilaq-project/lilaq/tree/main/src/plot"
click node_diagram "https://github.com/lilaq-project/lilaq/blob/main/src/model/diagram.typ"
click node_axes "https://github.com/lilaq-project/lilaq/blob/main/src/model/axis.typ"
click node_annotations "https://github.com/lilaq-project/lilaq/blob/main/src/model/label.typ"
click node_colorbar "https://github.com/lilaq-project/lilaq/blob/main/src/model/colorbar.typ"
click node_coordinates "https://github.com/lilaq-project/lilaq/blob/main/src/logic/process-coordinates.typ"
click node_scales "https://github.com/lilaq-project/lilaq/blob/main/src/logic/scale.typ"
click node_ticks "https://github.com/lilaq-project/lilaq/blob/main/src/logic/tick-locate.typ"
click node_time "https://github.com/lilaq-project/lilaq/blob/main/src/logic/time.typ"
click node_styles "https://github.com/lilaq-project/lilaq/blob/main/src/process-styles.typ"
click node_colors "https://github.com/lilaq-project/lilaq/blob/main/src/style/color.typ"
click node_algorithms "https://github.com/lilaq-project/lilaq/tree/main/src/algorithm"
click node_data_input "https://github.com/lilaq-project/lilaq/blob/main/src/loading/txt.typ"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plots toneBlue
class node_diagram,node_axes,node_annotations,node_colorbar toneAmber
class node_coordinates,node_scales,node_ticks,node_time,node_data_input toneMint
class node_styles,node_colors,node_algorithms toneRose
class node_typst_author toneIndigo
class node_lilaq toneTeal
```

## Components

### Plot Types

- [Plot Functions](https://github.com/lilaq-project/lilaq/tree/main/src/plot): `src/plot`

### Diagram Model

- [Diagram](https://github.com/lilaq-project/lilaq/blob/main/src/model/diagram.typ): `src/model/diagram.typ`
- [Axes and Ticks](https://github.com/lilaq-project/lilaq/blob/main/src/model/axis.typ): `src/model/axis.typ`
- [Labels and Legends](https://github.com/lilaq-project/lilaq/blob/main/src/model/label.typ): `src/model/label.typ`
- [Colorbar](https://github.com/lilaq-project/lilaq/blob/main/src/model/colorbar.typ): `src/model/colorbar.typ`

### Plot Logic

- [Coordinate Processing](https://github.com/lilaq-project/lilaq/blob/main/src/logic/process-coordinates.typ): `src/logic/process-coordinates.typ`
- [Scales and Transforms](https://github.com/lilaq-project/lilaq/blob/main/src/logic/scale.typ): `src/logic/scale.typ`
- [Tick Location and Format](https://github.com/lilaq-project/lilaq/blob/main/src/logic/tick-locate.typ): `src/logic/tick-locate.typ`
- [Date and Time](https://github.com/lilaq-project/lilaq/blob/main/src/logic/time.typ): `src/logic/time.typ`
- [Text Data Loading](https://github.com/lilaq-project/lilaq/blob/main/src/loading/txt.typ): `src/loading/txt.typ`

### Styling and Algorithms

- [Style Processing](https://github.com/lilaq-project/lilaq/blob/main/src/process-styles.typ): `src/process-styles.typ`
- [Color and Cycles](https://github.com/lilaq-project/lilaq/blob/main/src/style/color.typ): `src/style/color.typ`
- [Plot Algorithms](https://github.com/lilaq-project/lilaq/tree/main/src/algorithm): `src/algorithm`

### Other components

- **Typst Author**
- [Lilaq Library](https://github.com/lilaq-project/lilaq/blob/main/src/lilaq.typ): `src/lilaq.typ`

## Connections

- Typst Author → Lilaq Library: imports (evidence: `README.md`)
- Lilaq Library → Diagram: creates plots (evidence: `README.md`)
