Reproducing figures from documentation
All plots showcased in this repo are made to be easily reproducible.
To achieve this we use a combination of C++ targets and Python scripts residing in the auxiliary/
directory.
Auxiliary targets are built together with tests, examples & benchmarks in a similar fashion. These targets can be invoked to generate numerical data, which is then visualized with matplotlib.
Generating a figure
Build the project according to the guide.
To generate figures for <target_name>
run the corresponding executable:
./build/auxiliary/auxiliary-<target_name>-generate
and then plot the result:
python3 auxiliary/<target_name>/plot.py
Generated data & corresponding figures will reside in temp/<target_name>/
.
Important
Last step requires additional dependencies that aren't necessary for the build, see below.
Installing Python dependencies
python3
can be downloaded from the official website or using a package manager:
sudo apt update &&
sudo apt install python3
To install necessary dependencies run:
pip install matplotlib &&
pip install mplcyberpunk