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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

flowplotpy-0.9.11-cp312-cp312-macosx_10_15_x86_64.whl (786.1 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

flowplotpy-0.9.11-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.11-cp311-cp311-macosx_11_0_arm64.whl (753.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

flowplotpy-0.9.11-cp311-cp311-macosx_10_15_x86_64.whl (784.0 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

flowplotpy-0.9.11-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.11.tar.gz.

File metadata

  • Download URL: flowplotpy-0.9.11.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.11.tar.gz
Algorithm Hash digest
SHA256 82cedc7265e3c754fe076816ebf2b67ef7d44601efa4c144a90c071e942a1758
MD5 5249bb1c0c3a46e3d66162f6755d8128
BLAKE2b-256 cd797ee94b9b00042d08d9599ce3a6578c1e7dd18e2f74b6aad9adfca65cbdd0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.11-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.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 eac1e9a2e29ff345c0047160eebd375a9175063f8818b79958d6f1edfca60241
MD5 7409ba261b7be891afe7202bdf08948f
BLAKE2b-256 8bfead5d90ed25f5af453e72ceab73a3c15668b7cbd3bbfe945443efe5893cdd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b550359d1846c106f7d89ac374aac99f2e4d7a6bb82f7256db0d10112d6124b5
MD5 ee9690a30e6e0fa716eaf01017d60ef2
BLAKE2b-256 cf12789f75e46beab550ebad36fafcde9c3c0d7a8769062c85b7c25c2dc096c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6bd8aac42dd55a137942bbba7c2f5fa72bd2c1c6b5d42cbf7ce314d6e2c3d3a7
MD5 1c36223573a2d390f7df3159630eede5
BLAKE2b-256 7f6358bf4a3e4ada7b360001ef541f0e6a01df75f5e394ba555e105926d0b33c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d48ffda2a11c6f6c4137563bec53a9e2b2832e12b791e9d3627a7e26d5828080
MD5 a6cbab543c91e2bbbb0c104b0e7db10d
BLAKE2b-256 97649a2d7154eef8164e5912335c7e58a1a05022297d07cfc06b44eaf86fd5d4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.11-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.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a2f43c35a77aa51482acc106caf5dbcbeba7ef8b13a29028df5260ca717e89a6
MD5 685181050c4e2d28b287b4bb4d960cc7
BLAKE2b-256 70f6d10702f4826586de3a2e669e295c21116dea175a75c6130bf6a0f0dce902

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6fe22ee36f39cbebd1543a9b83dddb91a40fea475a264f420cbd8699a859c511
MD5 b6daae611292e69db7dd30b8e2b1f648
BLAKE2b-256 e9697e05a43e5ce3dc8869b12ecef14098f27bc4966a2c7d443c1c3b7a8ac8e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ebd046ad15e70e182cb3b13b205133bb1f4e3dcd902933f593871f4e851a0eca
MD5 2ebb9f416981d1eea2db812b51472a0d
BLAKE2b-256 fcce3a78e1b2c4ba3699c872486649fd9b94ebe83adc8e8d0af53331a9c8189a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4ac37523944a2e00c5efbc6fc30a7575fa5474f9d6c4fc4cf8567b2835e98770
MD5 f78e91310efa897561620eb1c5806fd8
BLAKE2b-256 5efb8637c632b497d19638a050fb184353524c2b8d01b850a1f2ca1bed2a0176

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.11-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.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 27c154aac193fb6d6ef971e42e824f8eeb6a86ec9792dfba44248bfeaca81020
MD5 1fa8a68ad4981d1499b208e49290d997
BLAKE2b-256 3297d32d0859c9f9d2273e84872a08152d0dc33dda38cf8e99dd41730b63379e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85fa22b9f6a7ec81ad6f1fe375e8bebf5ae64aecf71c1cc61231639977c869f9
MD5 64758fc3b7807c0f28cc059dd9de4ce2
BLAKE2b-256 6694c363bcb34ada248277e5e87b81b59dc1b1fd5f8410896efcf30107a0d962

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 49f3e88af8d5d2ceb4a17b01c66cb8ddd6b28586be29c2e05f45f1f52bced20d
MD5 7373cefac1f46f6049c71c839e4ddd31
BLAKE2b-256 3e8e6cfa3ec3a323fcb8ed976400350946a27283aa7c4d34c18f5e462f7305fe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.11-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f02a16cbf66948bd4b1abce1e468fb210d8db173de39642d2437eb723d1bf08a
MD5 7cc30e06b0e42caa0e3615a2448602f6
BLAKE2b-256 fa9187c36db5ee871ab33f12b104a21c178dc6d2a7a4cff43a9b0f43352caf03

See more details on using hashes here.

Provenance

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