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.

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.0.tar.gz (151.5 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.0-py3-none-any.whl (155.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fieldview-0.3.0.tar.gz
Algorithm Hash digest
SHA256 952f82cf77a5f3d256add332cc0caa2fd7183467034197cb9a49639dbc5f8756
MD5 9e918b254cfe0dcf0e4a44bac4465759
BLAKE2b-256 aa5ccbd7f76b180f4e428e1d0f6cfabdbb78d31a213c44319e01e6e8d6d980b9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fieldview-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4ae8620e0e5c1615d536c712943388fefc53f93871b1f1181f0e84edf79ad35
MD5 a6b6fde1cad37bf224b981853a7766d7
BLAKE2b-256 10f26b187274275bff25147975c109464cf6b5996a3e55d2020cc671c48fffc2

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