Interactively visualize data using pygame.
Project description
viztools
Interactive tools to visualize data in python using pygame.
The Image in the screenshot: Mainichi Shimbun, Public domain, via Wikimedia Commons
Installation
pip install viztools
See on pypi.
Usage
See examples.
Minimal example
import pygame as pg
import numpy as np
from viztools.drawable import Points
from viztools.ui.elements import Button
from viztools.viewer import Viewer
class SimpleViewer(Viewer):
def __init__(self):
super().__init__()
self.points = Points(np.random.normal(size=(1000, 2)), size=0.05)
self.button = Button(pg.Rect(50, 50, 120, 40), "Click me")
def update(self):
if self.button.is_clicked:
print('clicked')
viewer = SimpleViewer()
viewer.run()
Features
- Rendering of different drawable objects (Lines, Points, Images, Texts)
- Renders 100_000 points fluently, and can also handle 1_000_000 points and above (with some lag) (Rendering Lines is slow)
- UI elements (Buttons, Labels, EditField, TextField)
- EditField and TextField support many keyboard shortcuts, selection, copy/paste, ...
- Fast scrolling and zooming
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
viztools-0.6.4.tar.gz
(29.8 kB
view details)
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
viztools-0.6.4-py3-none-any.whl
(38.8 kB
view details)
File details
Details for the file viztools-0.6.4.tar.gz.
File metadata
- Download URL: viztools-0.6.4.tar.gz
- Upload date:
- Size: 29.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cfd0703d9aa6bc67fcde7c8977e936a1c77214f9a4c1f0ca76a0773213a3320
|
|
| MD5 |
a391fb2252f0df33da8be37153660686
|
|
| BLAKE2b-256 |
591842b7bc126a14eaa0ac43b5c94d9207b8825fb16e7761adaae5e55fcb51ff
|
File details
Details for the file viztools-0.6.4-py3-none-any.whl.
File metadata
- Download URL: viztools-0.6.4-py3-none-any.whl
- Upload date:
- Size: 38.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8078abbf1fd30e4db14153d7930c025643ea0540e02d4cf2142a8cc8f2a83ba1
|
|
| MD5 |
a7474ace929b696e6ddab51a37673f33
|
|
| BLAKE2b-256 |
40996031b9d7766d96ec15e8ceec9b6da321bfeba4798dc7a54980c41757fbb8
|