Python + Qt based 2D data visualization solution for irregular data points
Project description
FieldView
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.
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, andqtpy.
Performance
FieldView's FastRBFInterpolator is designed for real-time rendering. By precomputing the interpolation matrix, it achieves significant speedups during the rendering phase.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fieldview-0.3.1.tar.gz.
File metadata
- Download URL: fieldview-0.3.1.tar.gz
- Upload date:
- Size: 152.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5e4e19409b2f66a3a2b3b24475143cef487da21f78b2bb5d80339a56c21a1c4
|
|
| MD5 |
965cbce94fc0876c9c5e780a87a1609a
|
|
| BLAKE2b-256 |
e8fa8983888301593e1f731d5d8b06be17e8a9b95e2dc21b0be61c878fbb74fa
|
File details
Details for the file fieldview-0.3.1-py3-none-any.whl.
File metadata
- Download URL: fieldview-0.3.1-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.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1aaceb1c8dffd6709bc702262b44b33a56b0cdb9d38b689ef06d94061f508ceb
|
|
| MD5 |
4f778f0ea9129868b05ad07b8817750c
|
|
| BLAKE2b-256 |
417acaa53733043a10042d793d8de1e81cc04d343f72a70233a4dc5a95a54dce
|