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.6.tar.gz (668.0 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.6-cp312-cp312-win_amd64.whl (778.4 kB view details)

Uploaded CPython 3.12Windows x86-64

flowplotpy-0.9.6-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.6-cp312-cp312-macosx_11_0_arm64.whl (756.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

flowplotpy-0.9.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (865.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.15+ x86-64

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

Uploaded CPython 3.10Windows x86-64

flowplotpy-0.9.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (862.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

flowplotpy-0.9.6-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.6.tar.gz.

File metadata

  • Download URL: flowplotpy-0.9.6.tar.gz
  • Upload date:
  • Size: 668.0 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.6.tar.gz
Algorithm Hash digest
SHA256 903ef5dfe0b1d8465aae2b6afe91bf7fe6bb4e997ea94d348e7b6e168fe27e2b
MD5 fcb53e22356663305cbb3405e8cfbe15
BLAKE2b-256 848a0b82174c37a04a7ca20d8896fbc5abd2e10abe1f179b70497a0dc0f3d97a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 778.4 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.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 83b5e0f67761975a62aa4e860037c2eb6df8ca206ea90fefe4802bf2b2db5c14
MD5 d1886d62c1e02d3b3a2d4955d0943774
BLAKE2b-256 3cfd0d97e678496b490540ccc634f73d4d996c35fef0cafe21368843f40af048

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61efbd231f0d80420df953a9a78f4c752c4998d199332f11a142d17139ece07a
MD5 c36f03165f5725a0af9d2d1ca331aed4
BLAKE2b-256 50f63a3eefaa1f5e52dcdcae0d9845ee03233dfe55a006cb890361812fc50ac5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d72846dcaf856ab913ef647a5daeb80124e52cb4d9d073818991d6b56b42f2c5
MD5 f001ee801a9f7a4d2f16475ea105d07d
BLAKE2b-256 3e3eb3819b52544275f38c9680c773a526f63ed06930ff239583278e64e9b4ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 82e7d32a1e3122f2d735de1c89c663cd25c91eb0e88116341aaa8b9a9c37ee0d
MD5 86c934824da69b187ffd0101d9992888
BLAKE2b-256 4c24268f90857c8043dc50b929c4fe3dfb45ee020eac163769b157ea116470fe

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.6-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.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 50d56ffafeb6fd606f43cd1c604edfcb24ccad49ac10bfe9bf504f79074f0172
MD5 631a6d71e5347b7e633eb66a6fd5be76
BLAKE2b-256 0276b52a1aac1b7e79af55c857e83becc840e3e1d470d62bae7c0ee69f8651eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e1c822988870bc834b2a5574101be89d3fd795aa7ff08be325f751a66949120
MD5 635cf89788da1a1ce224d07f961b0bbd
BLAKE2b-256 7cb440b97b373e8a52c8d0d93f11b9b1f0963b1b41185993187318937a515b64

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d844d8dc266d68dc6882e5931006d917d0515f328d115db4214c46f48d75f842
MD5 2414cb0905e41de20f4ea8b7b74471b5
BLAKE2b-256 4d3f7c23a5cb27be2ee496080ca4e3775582eca82fdb599b4ecad04f571b2c21

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6c37d1c4f178f790c402421864f117e9b9867f4295cb53b99ab78b90106d1855
MD5 52f6577b39230ff6bdb8b971d00a8fc8
BLAKE2b-256 12f92354a20cce32de2474031c04ab25b434e702e4ecfb286e35b043e89bd915

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.6-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.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0e31ee9beee4648717057c3e319d2494434e5845cc6abfff6718a3309eb876dd
MD5 4adbd85a923f8e1b44ad5cbc038445ec
BLAKE2b-256 0f43672e4b863d0cde560fb15d644ee957a86cf63667cc0d246ccada6bb00705

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f188caf9df3cfb8fb91837a321093555968936f65b62637be5fbcdc6c34d3213
MD5 5456e5e40f8e732fe941c5e74b362ece
BLAKE2b-256 66464f077b5199ed0fa59095a0d90d7a223e35a898b2c55a6bb193764032b3ff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6ca61f70f90d4a823ead0fd658ac71709f439066e777e72b6056542ddb6f62da
MD5 066c98cff0d20253f3f715748794f3cb
BLAKE2b-256 77eb9409916430a0b6085a068af43afb48cb2a10af91fb0c7f99705f1f87eedd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.6-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a3e370785e53e32eda0616339f052c109623000f25f78eb13bc6779d57ba1a78
MD5 260e31d2c4d44b9d55b48a68cf96a971
BLAKE2b-256 b3964e4e1ba14fe69ef45f97187c8a614b235eef98b948021a11a0ba09a3b094

See more details on using hashes here.

Provenance

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