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.9.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.9-cp312-cp312-win_amd64.whl (778.3 kB view details)

Uploaded CPython 3.12Windows x86-64

flowplotpy-0.9.9-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.9-cp312-cp312-macosx_11_0_arm64.whl (754.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

flowplotpy-0.9.9-cp312-cp312-macosx_10_15_x86_64.whl (786.0 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

flowplotpy-0.9.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (865.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

flowplotpy-0.9.9-cp311-cp311-macosx_11_0_arm64.whl (753.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

flowplotpy-0.9.9-cp311-cp311-macosx_10_15_x86_64.whl (783.9 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

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

Uploaded CPython 3.10Windows x86-64

flowplotpy-0.9.9-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.9-cp310-cp310-macosx_11_0_arm64.whl (752.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

flowplotpy-0.9.9-cp310-cp310-macosx_10_15_x86_64.whl (782.9 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: flowplotpy-0.9.9.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.9.tar.gz
Algorithm Hash digest
SHA256 7fc4216a07e9621962ef29297567737291fb8cfc8419949bfc46d5f8831ef3e3
MD5 a5c0aac3190da32b2d88623821713d99
BLAKE2b-256 249e712dde546b30d6366fe1a0928782050b1ae33649fa92f50a853dd74f19db

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9.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.9-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: flowplotpy-0.9.9-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.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fea16472b218798b30a75be44657e18300c02e72b25d8bad8e9aa2a85cc03de6
MD5 a747a175e812735c7c928454db77373e
BLAKE2b-256 967db7347f1318f2f1b303f566aed3b7732c9bd2cce0b28417924785a44b115b

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4fcaa4a48e61000f8af84daa46009368779a9ffa0232fd0c9baf5e2b0263eb6c
MD5 50069c451db86beaf561ae6d66ba2bc9
BLAKE2b-256 16a30c33a41fb2e87c89c90f0a0c608c685e5b0e85a9a7c97aa508fcabfc5c55

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e2008a206ad56eb968780d923a932c803f785d56cc681111f812c073395aa780
MD5 7b2e2f7e854cca40b3603a56ac57dac4
BLAKE2b-256 50d9cf95cc5dd7bb8d11c7d6645097afe62001e22fd594ec95ea7ff29fdb8f7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5d780d0d2d88ca116fb1414ee110f1c7e8547dc5fbb417bdba0bc152e2c086e5
MD5 d009a68733b0c450e9ad3421da67ea16
BLAKE2b-256 2425398e9d6c0a91cd7adb3f25ce1639a52bad90c82843fa721adf60393a19f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: flowplotpy-0.9.9-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.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 90cffd177d67724474f05dbef9c48493798eeeb08a0f07edd1526ef6feac78e1
MD5 45633d621596509a18962c7e49f877d7
BLAKE2b-256 f6b2a0dada56db0ed8bcb66ade047d62e306b7ec4eaa8e1ec7aecc508f671047

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8eb598549eb03edc438d4dd9f1b5543f8d2cce53c95bdad366909f95f0dc8df3
MD5 258bb3cd22641055906a171ad763fc50
BLAKE2b-256 5756ce8f96318e6797720975eef8fffb208a5200cac9f08c038a2d509193e766

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 635a7b519ed13bf84a942111fedb5246298903f5911c12df21bdadc03475fc00
MD5 07261aef0e4adf0db197964416d22ea3
BLAKE2b-256 4ac73272ed1902e484a2ebb3dd9edad1aa5f9d9bd303b2520f2884ad8dc1ae4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 af490b3b0f2c5d015161124c6bf3b15b7ddc0d713d5f452b1faa45c0cf811d6b
MD5 9719d4264016e34613a86492489c68f3
BLAKE2b-256 2dc9018ea7905d3721e3019153e0306821ae1331a0d52b768e17f57b5ca83a6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: flowplotpy-0.9.9-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.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8a3e7a286d0dfe99156e0f896bf14dcb7f6e846a007fcc9210b698327d5be232
MD5 bf61a1b5db7f894e2bc95911622bfdb5
BLAKE2b-256 f890d03e13f7b9ee8bd686b7fd1a51f6176e83f15953e16caeec3a1515bd6c3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6549b3eb57568b19d394eb79e17bc01a5557f88af6f304830999390679c833fc
MD5 79c0c817b314026bdd90df18ea1944f4
BLAKE2b-256 03e560618c33f76fe63641308c65fcf445df56bad22a5f84f93652e484f5a110

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a8384230044e5b58c627f1ccfe87a9d07e45dde8fee5bfb07150c356b66c5890
MD5 83d4818fb241c4a3ad5a3b662b8e2fb1
BLAKE2b-256 149e1cc71812f279abb1c2a217bccfd6bc655b4a22a842d20ac1cbfa1072c90e

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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.9-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for flowplotpy-0.9.9-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 cde5c97d5e6229f485cb609ce0ee43bc5e7fc54b11d5cb574acd8b9b67de32c1
MD5 2ba824a09cae2b603f77f1cea7f6add0
BLAKE2b-256 0a13fa33d86928c5da5ef2a4f0dc0b54f48e3266b2971f5a109b109197de1dbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowplotpy-0.9.9-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