Library

mathplot v2.0

Versionv2.0
Stars★ 65
Released2026-09-21

C++ modules for plotting, graphing and data visualization

Release notes

## What's Changed

### C++20 Modules
```c++
import mplot.visual;
```
The major change in this release is that matplot is now provided as C++20 modules! I'm finding this beneficial in my own work with the library; it enforces better code design, reduces recompile times in many cases and is convenient. However, it does have one, unfortunate drawback: The code will not compile with GCC (#148) or VisualStudio (#149). Instead, you must (at least at the moment) use LLVM/Clang version 20 or higher. Presumably this is a temporary issue and GCC and VisualStudio will catch up with clang soon.

### New features
<img width="3288" height="598" alt="Hexagonal_FFT" src="https://github.com/user-attachments/assets/6380d263-3db6-4e1d-93ed-74bda6b57e44" />

New features in this release include a Runge-Kutta solver example and updates to `HexGridVisual` following changes to increase the flexibility of `sm::hexgrid` so that it could be used in a hexagonal fast Fourier transform. There is also a hex FFT example program (but see also https://github.com/sebsjames/hex_fft).

The `TriaxesVisual` has had its name changed to AxesVisual, and can be used to create 2D and 3D axes. New visuals include `PlaneVisual`, `DoubleHexGridVisual` and a `BezCurvePathVisual`. 

It is now possible to append a pre-computed meshgroup to any `VisualModel`. This is useful for adding a static mesh from, for example, a glTF file to a VisualModel which is otherwise dynamic (say, an insect head model added to dynamically updated insect eyes, as in https://github.com/BrainBeatsBrawn/antpov).

The antpov project also motivated some work on making scripted scene camera movements and on collision detection between oriented bounding boxes.

### PR list

* Film direction by @sebsjames in https://github.com/sebsjames/mathplot/pull/141
* Changes to make GLSL compatible with OpenGL ES by @sebsjames in https://github.com/sebsjames/mathplot/pull/144
* Call PolygonMode only if we are NOT in GL ES mode by @sebsjames in https://github.com/sebsjames/mathplot/pull/146
* Modular mathplot MAJOR CHANGE by @sebsjames in https://github.com/sebsjames/mathplot/pull/136
* Removes some extraneous includes which confounded clang++20 on Ubuntu 26 by @sebsjames in https://github.com/sebsjames/mathplot/pull/151
* Removes a redundant setting of CMAKE_MODULES_PATH by @sebsjames in https://github.com/sebsjames/mathplot/pull/152
* Simplifying module_definitions.cmake in mathplot by @sebsjames in https://github.com/sebsjames/mathplot/pull/153
* Runge Kutta example by @sebsjames in https://github.com/sebsjames/mathplot/pull/154
* Removes some redundant modules in a list by @sebsjames in https://github.com/sebsjames/mathplot/pull/155
* Adds oriented bounding box collision detection for VisualModels by @sebsjames in https://github.com/sebsjames/mathplot/pull/156
* Moves jc_voronoi.cppm into sebsjames/maths by @sebsjames in https://github.com/sebsjames/mathplot/pull/159
* Adds a simple plane visualizer by @sebsjames in https://github.com/sebsjames/mathplot/pull/160
* Fix that HexGridVisual when we transform the hexgrid by @sebsjames in https://github.com/sebsjames/mathplot/pull/161
* Adds a visual for bezcurve paths (also updates to use templated sm::hexgrid<F>) by @sebsjames in https://github.com/sebsjames/mathplot/pull/163
* Move mplot::compoundray::EyeVisual to BrainBeatsBrawn/craysim by @sebsjames in https://github.com/sebsjames/mathplot/pull/164
* Allow appending meshgroups by @sebsjames in https://github.com/sebsjames/mathplot/pull/165
* Adds an example for sm::algo::hexgrid::mask_outside_radius by @sebsjames in https://github.com/sebsjames/mathplot/pull/167
* Adds the double hexgrid file by @sebsjames in https://github.com/sebsjames/mathplot/pull/166
* HEX FFT by @sebsjames in https://github.com/sebsjames/mathplot/pull/168
* AxesVisual will be the new TriaxesVisual, with ability to be 2D or 3D by @sebsjames in https://github.com/sebsjames/mathplot/pull/169
* More cont…

Share this resource


Discovered 2026-09-22 Source GitHub Archive 2026-09 →