Skip to main content

Python + Qt based 2D data visualization solution for irregular data points

Project description

FieldView

Quality Tests Ruff Checked with mypy

FieldView is a high-performance Python library for 2D data visualization, built on top of the Qt framework. It is designed to efficiently render irregular data points using heatmaps, markers, and text labels.

FieldView leverages QtPy to support PySide6, PyQt6, and PyQt5, providing a flexible and robust solution for integrating advanced visualizations into Python desktop applications.

FieldView Demo

Key Features

  • High-Performance Heatmaps: Utilizes hybrid RBF (Radial Basis Function) interpolation for smooth, high-quality visualization of scattered data.
  • Irregular Data Handling: Natively supports non-grid data points without requiring pre-processing.
  • Flexible Masking: Supports arbitrary boundary shapes (Polygon, Circle, Rectangle) for precise clipping.
  • Modular Layer System:
    • HeatmapLayer: Renders interpolated data with customizable colormaps.
    • ValueLayer / LabelLayer: Displays text with automatic collision avoidance.
    • PinLayer: Visualizes data points with markers.
    • SvgLayer: Renders SVG backgrounds for context (e.g., floor plans, maps).
  • Minimal Dependencies: Core functionality relies only on numpy, scipy, and qtpy.

Performance

FieldView's FastRBFInterpolator is designed for real-time rendering. By precomputing the interpolation matrix, it achieves significant speedups during the rendering phase.

Benchmark Plot

Note: FastRBF requires a one-time setup cost to accelerate subsequent frame rendering.

Installation

Install FieldView with your preferred Qt binding:

pip install fieldview[pyside6]  # Recommended
# OR
pip install fieldview[pyqt6]
# OR
pip install fieldview[pyqt5]

Requires Python 3.10+

Quick Start

FieldView provides a high-level FieldView widget for easy integration.

import sys
import numpy as np
from qtpy.QtWidgets import QApplication
from fieldview import FieldView

app = QApplication(sys.argv)

# 1. Prepare Data
points = np.random.rand(20, 2) * 400
values = np.random.rand(20) * 100

# 2. Create FieldView
view = FieldView()
view.resize(800, 600)
view.set_data(points, values)

# 3. Add Layers
view.add_heatmap_layer(opacity=0.6)
view.add_pin_layer()
view.add_value_layer()

# 4. Show
view.show()
view.fit_to_scene()

sys.exit(app.exec())

Examples

To explore the full capabilities, including the property inspector and real-time updates, run the included demo:

# Using uv (recommended)
uv run examples/demo.py

License

This project is licensed under a hybrid model depending on the Qt binding used:

  • LGPLv3: When used with PySide6.
  • GPLv3: When used with PyQt6 or PyQt5.

Please ensure compliance with the license of the chosen Qt binding.

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

fieldview-0.3.2.tar.gz (152.1 kB view details)

Uploaded Source

Built Distribution

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

fieldview-0.3.2-py3-none-any.whl (156.2 kB view details)

Uploaded Python 3

File details

Details for the file fieldview-0.3.2.tar.gz.

File metadata

  • Download URL: fieldview-0.3.2.tar.gz
  • Upload date:
  • Size: 152.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for fieldview-0.3.2.tar.gz
Algorithm Hash digest
SHA256 c36e82b3bdef042c9a79c66e3d5e5a0cef607820ce77cad41788a5766cfabdf5
MD5 e2f3d52dbdd0efb89688de16d4ddb7c5
BLAKE2b-256 d947ad6d1c3e3918a2d8df8313b85aaba84e7b72845e09232ef78e34f7851624

See more details on using hashes here.

File details

Details for the file fieldview-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: fieldview-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 156.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for fieldview-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18ebc14b951210386e59804501af4613e02be2b2757ccf0e9b3115fa7e3d8cf8
MD5 66bfc8d84804a6e9532a51edc1c1f12d
BLAKE2b-256 70a314ebcdc6b6ac9aa7d3a8db80f0955239b798b8cc70e6b96590fc12453853

See more details on using hashes here.

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