Skip to main content

Python bindings for the FlowPlot plotting library

Project description

FlowPlot

FlowPlot is a prerelease plotting library for C++ and Python. It renders plots from reusable JSON templates and runtime data, with a small chaining API for changing template values, binding data, and writing images.

The project is currently focused on scatter and histogram-style plots, template-driven layout, reusable visual defaults, and a GUI workflow for authoring templates.

What Is FlowPlot?

FlowPlot is a plotting system built from a few programmatic parts rather than a single monolithic plotting call.

At the core is a compiler pipeline. It takes a plot template plus runtime data, normalizes the template with defaults, binds the supplied data fields, resolves layout and axes, and outputs renderer-independent drawing commands. Those commands can be consumed directly by an application, or passed to FlowPlot's built-in CPU renderer to produce a final image such as a PNG.

For C++, FlowPlot is header-only. You can include the modular headers or use one of the generated single-header FlowPlot_Mega*.hpp variants. For Python, FlowPlot is packaged as a native extension module built from the same C++ core.

FlowPlot also comes with FlowPlotGUI, a desktop app for visually authoring templates. The GUI is intended to make templates reusable and composable: instead of hard-coding every plot from scratch, users can build pluggable template blocks and feed them new data from C++ or Python. As a prerelease, customization is still limited in places, but the scaffolding for that template-first workflow is already in the project.

Quick Start

Python

Install the Python package:

pip install FlowPlotPy

Create or export a template, then bind data and write a PNG:

import flowplot

plot = flowplot.plot("./ScatterTemplate")
plot.with_data("main.x", [1, 2, 3, 4, 5])
plot.with_data("main.y", [3, 4, 1, 4, 6])
plot.write_png("pythonPlot.png")

The Python package includes a default font, so basic PNG rendering works without manually registering one. NumPy arrays are recommended for larger data, but normal Python lists are supported.

C++

Use the full single-header build when you want the simplest include path:

#define FLOW_PLOT_RENDERER
#define FLOW_PLOT_IMPLEMENTATION
#define FLOW_PLOT_DEFAULT_FONT_PATH "./Inter.ttf"
#include "FlowPlot_Mega.hpp"

#include <vector>

int main()
{
    std::vector<int> x{1, 2, 3, 4, 5};
    std::vector<int> y{3, 4, 1, 4, 6};

    FlowPlot::plot("./ScatterTemplate")
        .withData("main.x", x)
        .withData("main.y", y)
        .writePng("./CppPlot.png");
}

Compile:

g++ -std=c++20 -I. main.cpp -o plot

For modular headers, include FlowPlot/FlowPlot.hpp and add the needed include paths for bundled dependencies.

Tech Stack

FlowPlot is written in modern C++ and uses:

  • RapidJSON for template parsing and normalization.
  • stb libraries for the built-in CPU image/font path.
  • pybind11, scikit-build-core, and CMake for the Python extension build.
  • FlowUi, Vulkan, GLFW, and Native File Dialog for FlowPlotGUI.
  • Doxygen for generated C++ API documentation.

The C++ library can be used as modular headers or as generated amalgamated headers. Regenerate the mega headers with:

python3 tools/generate_flowplot_mega.py

Available generated headers:

  • FlowPlot_Mega_Core.hpp: FlowPlot headers only.
  • FlowPlot_Mega_Stb.hpp: FlowPlot plus stb headers.
  • FlowPlot_Mega_Json.hpp: FlowPlot plus the used RapidJSON subset.
  • FlowPlot_Mega.hpp: FlowPlot plus RapidJSON subset plus stb, intended as the most self-contained option.

Template Overview

FlowPlot templates are JSON documents that describe the static structure of a plot. Runtime code supplies data and may override selected template properties before rendering.

A typical template contains:

  • version: template format version.
  • fonts: optional font manifest for C++ rendering.
  • figure: image size, background, padding, title, and figure-level layout.
  • datasets: named dataset schemas.
  • panels: plot panels with axes, titles, styles, and layers.
  • layers: visual layers such as scatter or histogram mappings.

Runtime data is bound by dataset and field name:

plot.withData("main.x", xValues);
plot.withData("main.y", yValues);
plot.with_data("main.x", x_values)
plot.with_data("main.y", y_values)

Templates are meant to be reusable. You can author a template once, then use it with different data or small property overrides:

FlowPlot::plot("./ScatterTemplate")
    .set("figure.title.text", "Experiment 12")
    .withData("main.x", x)
    .withData("main.y", y)
    .writePng("experiment-12.png");

Detailed API, schema, packaging, and GUI documentation will live in separate docs as the prerelease stabilizes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flowplotpy-0.9.10.tar.gz (671.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flowplotpy-0.9.10-cp312-cp312-win_amd64.whl (778.3 kB view details)

Uploaded CPython 3.12Windows x86-64

flowplotpy-0.9.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (865.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

flowplotpy-0.9.10-cp312-cp312-macosx_11_0_arm64.whl (756.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

flowplotpy-0.9.10-cp312-cp312-macosx_10_15_x86_64.whl (788.4 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

flowplotpy-0.9.10-cp311-cp311-win_amd64.whl (776.1 kB view details)

Uploaded CPython 3.11Windows x86-64

flowplotpy-0.9.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (865.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

flowplotpy-0.9.10-cp311-cp311-macosx_11_0_arm64.whl (755.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

flowplotpy-0.9.10-cp311-cp311-macosx_10_15_x86_64.whl (786.7 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

flowplotpy-0.9.10-cp310-cp310-win_amd64.whl (775.1 kB view details)

Uploaded CPython 3.10Windows x86-64

flowplotpy-0.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (862.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

flowplotpy-0.9.10-cp310-cp310-macosx_11_0_arm64.whl (754.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

flowplotpy-0.9.10-cp310-cp310-macosx_10_15_x86_64.whl (785.4 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

Details for the file flowplotpy-0.9.10.tar.gz.

File metadata

  • Download URL: flowplotpy-0.9.10.tar.gz
  • Upload date:
  • Size: 671.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowplotpy-0.9.10.tar.gz
Algorithm Hash digest
SHA256 ddc5d6ffa1b8d77df288adfe852c7357208b3e7e8fff9a3248b05ff5d649e098
MD5 c8458902a959fcd96a03ebe468a14a93
BLAKE2b-256 5e447dfe1c910470232773d1a8755450eacf38cf8f3308aded37a6877b6cfe7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10.tar.gz:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: flowplotpy-0.9.10-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 778.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowplotpy-0.9.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 66b08332b7b0a1f542916f50dd5bdb233b716388ef4305278c61cec03ebca3ce
MD5 5efcd0c83ac158198703430ab7f74ea6
BLAKE2b-256 aa30e3a186e5c1bd98732dec9e64e1b350dcc739d1fee937a4a0331014ce5a87

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp312-cp312-win_amd64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f7f6d0582922e09cef31848d83fec5f6c6025260d561f3f410c86bfe28fcc91
MD5 a4c752a72d0dfe0c84750da24ae86b3f
BLAKE2b-256 8d696df289942860b1edadc9a3bc99eb8263f73c09c50e30c025d6626f0d7aca

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4d53a4bb8edcbc7b2b205b3cd329915f612b42e4b16855aa3401ab18d520baec
MD5 b355915166273956eb7bcfa1c396ebbc
BLAKE2b-256 eace1446a2f9867ed7403abc609eadae0479b7831274e9122082c90b37278436

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8ef43fd69ece3b274b82bc80c334397d06cec601bfd7e3f1c669863362f816b6
MD5 0102eddb0af032e91f3f7d48fad16c6b
BLAKE2b-256 71f564bb68bb55b03fadb9e85f97c9889d144556051ae3473a921a84def1044f

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp312-cp312-macosx_10_15_x86_64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: flowplotpy-0.9.10-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 776.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowplotpy-0.9.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e16d6c6574854a5cbe3c15fea37a2da5e137e4a420abd0785fb2a4983375a09d
MD5 3e183dcf634e2caeb9f6c598c07bb609
BLAKE2b-256 8e1644be448c3f56d33464753e247101e41fddc415c9cc2ae4f5ce047b7c323d

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp311-cp311-win_amd64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9f3c7a56bcfcf0fb500e2af76871d6d9f0af691d8ead680cae5851a0172386c
MD5 dfc5022a9a3e14c25414012d56129409
BLAKE2b-256 8977bda2fd8203e598d22f41dd8fcde18176396b27b8e4bddd26acb04eeff6d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 396d0bc17ba3984206ccec6b9d0413248838fb20fc4f8a24eae32a2a26d64356
MD5 42bc4de767e6138675ec24203578f1a8
BLAKE2b-256 8df30d524376edc3c662fc247bcf7c4f82c92714eb88c377bda1d38014d625f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f448ccbeee1d367485fe5d94e3a8ea72664631ef17ac505fff57ea6c81865194
MD5 f1d34eec2a66dd37f3acdb4f29778c43
BLAKE2b-256 e7ada4c9c4185831ec0f36fea4abdee48e95e0e27d8ae5c461dc6dd0a6ee97b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp311-cp311-macosx_10_15_x86_64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: flowplotpy-0.9.10-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 775.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowplotpy-0.9.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8557b71b3b599d945112d7d1dd44fa0a4c2df14bee4a8cd0d7aca84ccc8d6118
MD5 06b3df8c3be0608c06d7114b707b0f57
BLAKE2b-256 90f5681a092b49a6ac820cbcbf385895820162ecbd888919c7fb24a8849d960d

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp310-cp310-win_amd64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b0941a46673cf60991ebf2340675d4a8456a09ed98629c6a8a4fdbe6f25c6a9
MD5 161bc40edfb9a092ac619f3031efddd2
BLAKE2b-256 04108d4ea5765b866995da3cdeddbb9baa895e19bd4ff036d2a529384a8dfa47

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 763cb5c77937fb4ca43f18d831b40033046a38cbf0e0f80a0ee442f7e1e1b4b3
MD5 b0702f8c5b33a8d50f09bfd86fb08a1c
BLAKE2b-256 c708a0ba988cb3617e09e6633bee8ff4af2b0dfa6773a61df1fcc45686b7af6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowplotpy-0.9.10-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.10-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 fe25353ef7c35683288f4deb6e78a2ff44fd53d91b1472b42219267509640df6
MD5 483d37819932a6f281de7163bc2f2665
BLAKE2b-256 7ae2743695c428e46400b2523ff0babffcc5a36d48e54b3cfab132e3126c04b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.10-cp310-cp310-macosx_10_15_x86_64.whl:

Publisher: release.yml on Manwe314/FlowPlot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page