G3P is a tiny but mighty header-only modern C++ interface library for Gnuplot.
Itβs the most natural and intuitive way of adding Gnuplot support into any C++ program.
Itβs also one of few C++ libraries to support embedding of plots in Jupyter notebooks.
Cool G3P Features πͺΒΆ
Using G3P you can embed plots in Jupyter notebooks running on Xeus-Cling kernel.
π Animated Plots
G3P supports embedding animated plots into Jupyter Notebooks in several ways.
G3P in combination with xwidgets can produce interactive plots in a Jupyter Notebook.
Both C
(%d
,%f
, ...) and C++
(<<
) conventions for passing arguments to Gnuplot are supported. You can even mix and match them.
Key Features π₯ΒΆ
- π₯οΈ Multiplatform (Linux, macOS, Windows)
- π₯ No dependencies (except Gnuplot)
- ποΈ Header-only (only one header file)
- πͺΆ Lightweight (~300 lines of code excluding comments)
- β‘ Fast (all i/o implemented with
C
API andC++11
threading) - π Support embedding plots in Jupyter Notebooks
- π« Easy to learn. If you know Gnuplot, youβre already set.
- π₯ Easily integrates with existing libraries and code (via CMake configs)
- β‘οΈ Support fluent interface
- π Support both
C
(%d
,%f
, ...) andC++
(<<
) conventions for passing arguments - π§ͺ Include unit tests
- π Well documented