Skip to main content

Interactively visualize data using pygame.

Project description

viztools

Interactive tools to visualize data in python using pygame.

screenshot 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


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.1.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

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

viztools-0.6.1-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file viztools-0.6.1.tar.gz.

File metadata

  • Download URL: viztools-0.6.1.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for viztools-0.6.1.tar.gz
Algorithm Hash digest
SHA256 5baf8f5c39b58139440c04f9b9de3f79e7e9f7122f8187fded77814ae488dfac
MD5 23706b218e94ddd3316f82741d6eef44
BLAKE2b-256 eecb6be4ef1ae5a49e5c39dd0144b782195e48dc928a8232e8089c8af8755eb0

See more details on using hashes here.

File details

Details for the file viztools-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: viztools-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for viztools-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc04fd9726dfe5174d87c4a80b95e47602c5c47f4bcccb8590c5fe9fb7c5b960
MD5 80b416355ac45ff8af326cfb2e7e14c3
BLAKE2b-256 8cad559461bcf902e85a5eeaee40a296094fb6fbb1fc533b44f23f27580b8091

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