# vasilyaksenov/qcustomplot architecture

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

- Interactive diagram: https://gitdiagram.com/vasilyaksenov/qcustomplot
- Repository: https://github.com/vasilyaksenov/qcustomplot

## Overview

QCustomPlot is a Qt C++ plotting widget: an application configures a plot with data and presentation options, then displays it or exports it as an image or PDF. Its documented capabilities include Cartesian axes and tickers, plot layouts, multiple plottable and chart types, color maps, annotations, and interactive selection. The tree and excerpts identify these subsystems in the amalgamated header and implementation; the sampled source is partial, so the graph shows only high-level documented relationships rather than detailed internal call paths.

Main entry points: [`qcustomplot.h`](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h) (QCustomPlot widget)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plot["Plot composition"]
  node_qcp["QCustomPlot widget<br/>[qcustomplot.h]"]
  node_axes["Axes and tickers<br/>[qcustomplot.h]"]
  node_layout["Plot layout<br/>[qcustomplot.h]"]
end

subgraph group_visuals["Plot visuals"]
  node_plottables["Graphs and charts<br/>[qcustomplot.h]"]
  node_color["Color maps<br/>[qcustomplot.h]"]
  node_annotations["Items and labels<br/>[qcustomplot.h]"]
  node_data["Data containers<br/>[qcustomplot.h]"]
end

subgraph group_interaction["Interaction"]
  node_selection["Selection tools<br/>[qcustomplot.h]"]
  node_events["Mouse interaction<br/>[qcustomplot.h]"]
end

subgraph group_render["Rendering and export"]
  node_painter["Plot painting<br/>[qcustomplot.h]"]
  node_export["Image and PDF export<br/>[qcustomplot.h]"]
end

node_application(("Host application"))
node_qt["Qt framework"]

node_application -->|"configures and displays"| node_qcp
node_application -->|"requests export"| node_qcp
node_qcp -->|"uses"| node_axes
node_qcp -->|"uses"| node_layout
node_qcp -->|"displays"| node_plottables
node_qcp -->|"displays"| node_color
node_qcp -->|"displays"| node_annotations
node_plottables -->|"stores plot data"| node_data
node_color -->|"uses"| node_data
node_qcp -->|"handles input"| node_events
node_events -->|"updates"| node_selection
node_qcp -->|"renders"| node_painter
node_qcp -->|"exports"| node_export
node_qcp -->|"uses"| node_qt

click node_qcp "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_axes "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_layout "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_plottables "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_color "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_annotations "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_data "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_selection "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_events "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_painter "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"
click node_export "https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h"

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_qcp,node_axes,node_layout toneBlue
class node_plottables,node_color,node_annotations,node_data toneAmber
class node_selection,node_events toneMint
class node_painter,node_export toneRose
class node_application,node_qt toneIndigo
```

## Components

### Plot composition

- [QCustomPlot widget](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`
- [Axes and tickers](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`
- [Plot layout](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`

### Plot visuals

- [Graphs and charts](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`
- [Color maps](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`
- [Items and labels](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`
- [Data containers](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`

### Interaction

- [Selection tools](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`
- [Mouse interaction](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`

### Rendering and export

- [Plot painting](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`
- [Image and PDF export](https://github.com/vasilyaksenov/qcustomplot/blob/master/qcustomplot.h): `qcustomplot.h`

### Other components

- **Host application**
- **Qt framework**

## Connections

- Host application → QCustomPlot widget: configures and displays
- Host application → QCustomPlot widget: requests export
- QCustomPlot widget → Axes and tickers: uses
- QCustomPlot widget → Plot layout: uses
- QCustomPlot widget → Graphs and charts: displays
- QCustomPlot widget → Color maps: displays
- QCustomPlot widget → Items and labels: displays
- Graphs and charts → Data containers: stores plot data
- Color maps → Data containers: uses
- QCustomPlot widget → Mouse interaction: handles input
- Mouse interaction → Selection tools: updates
- QCustomPlot widget → Plot painting: renders
- QCustomPlot widget → Image and PDF export: exports
- QCustomPlot widget → Qt framework: uses
