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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.15+ x86-64

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

Uploaded CPython 3.10Windows x86-64

flowplotpy-0.9.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (862.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

flowplotpy-0.9.8-cp310-cp310-macosx_11_0_arm64.whl (752.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

flowplotpy-0.9.8-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.8.tar.gz.

File metadata

  • Download URL: flowplotpy-0.9.8.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.8.tar.gz
Algorithm Hash digest
SHA256 e3e9857cf60f8b178d6676ce63846e13b872ce1d59542fc3dd94508cca9d65f9
MD5 609f44afafdff5ba3bdc5695265bab58
BLAKE2b-256 59f8ea4e9c93a1da460d81daf93119916094274ebc0a0696d00abe9d438eaf95

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.8-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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5609e5a84a67e30b9a353ac34819b0d3a7d1063ceadf5312fb5febdfdd217856
MD5 dbeec24135413e5c945843e8aa1b862f
BLAKE2b-256 73a202e3c7037120c700026cd07bfc8615b44e902ea68a25c671923c6b5cd1ed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60aa612c99548905cb33dcd8617a73de6e051f55c7fbe186c4cfd45ffe7f6b7a
MD5 622a2885b94a6478d7782ffcefcae926
BLAKE2b-256 bf210260080ba4c59cd42d4541424e488923e0b0a3ee4dad3d1ec2d70e0929c8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 79f839e73b0239f83f72feeee11373b9f82490fe628a83ea40d1196f1342d9ae
MD5 1f0887f686237e05a61e8590fe87d106
BLAKE2b-256 02e5a01e51477f9fb2aee70336c33fa8f348cd4b6f4c18a7a8df944eff0d8335

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 168b44da45ee4f8d4b94ecef9f000f5eb73e7d1adb856a169194399e88e5e89b
MD5 9a875b0dc0341b400e2e16abd9736feb
BLAKE2b-256 cba805d22bbb48a07a5211848de7161fe10060f8a21b622ed93970e295ed75e2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.8-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.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b3e39931c9101c0b48a6fb74262bfa11a41dce5c59a359868025ec858ddbbc0f
MD5 0407f5332596a1672e6e12d721864544
BLAKE2b-256 3d79c9fefa7ec305077fb460a4129f5c8c37ad3a2256f4dcd9f7ebf05360728f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 464275beb22d2701917203ed6c80553a48d784c957fabcd737f463e6a13f1d31
MD5 0e3f2c918864133511f8ca6767e59c3a
BLAKE2b-256 63ac5f04933267e32a44df0be5bf987fbc8993bdaf36523b09a3db07712e4b72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c2aa4f5e09bc2bccc8178562e2afb230a60607f447d351541035d33d7001763
MD5 f4356a6573058b4a5214c99ee6facbc8
BLAKE2b-256 c478219bcac0afc6c60da55e1c8d059c4c59647ffaf5a96bb4d36f712149fd1e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 a76268777b785ddfd110a68f1daf7362e4befeb554da1b41ed72dd109032e9fc
MD5 b717d7c2fec48104490df36ef6285d5d
BLAKE2b-256 032fcd799be996b6837180b35a0249566be8cf496da249365a74ec9355af86d3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: flowplotpy-0.9.8-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.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eba012f4767add172fdeb23410c95adc230e471bbc8abd7ac2d62af5bcfbf621
MD5 6ff4452920fc55e51f96d060c67825fe
BLAKE2b-256 c173f57ab6b30c4f912e21feac24a4cbb5b3f4c186e59f4a57c55d44b1d386d8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 461500aac3c26d1aabe7689838325f08a52a6baa3a0458de91278801f8844798
MD5 c37bbebdae7cfaf94ef373a8d3297b2f
BLAKE2b-256 59df68fe443f44a542823ace1677f36d6b6456b3e0d9a0d02377ca78202ff827

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 55167e271f4c36be8b0c79e70dc419ebd5433a9c695fc1784d64c14f5bc1bbd7
MD5 9f24245636a002e46b037eaf58c8c162
BLAKE2b-256 fa2498bcd67da56753669331cc789d157e579f8f440a01dbb419a8a581a15417

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for flowplotpy-0.9.8-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2862dd94de9c1cc1b2c9bef8204558c4fc8e9ea87536ad0d77798d9a90886c6c
MD5 26570e0be5b2a6d243a456bdedc6da1a
BLAKE2b-256 86aed6498d5f949e2840e56ba3277e365d6267a7b30da3af9b7a294e4d466254

See more details on using hashes here.

Provenance

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