Skip to main content

A Python package for plotting.

Project description

PyPI version

pyglplot

A powerful Python plotting library that leverages OpenGL to provide exceptional performance and high-quality visualizations of 2D data. Based on the JavaScript library webgl-plot this library is specifically designed for real-time plotting of line, scatter, and histogram plots. This library is cross-platform and works on Windows, Linux and Mac thanks to GLFW windowing library. Furthermore, It is also compatible with Jupyter notebooks. This package is ideal for plotting realtime data from sensors and instruments, including streaming devices such as microphones and cameras, empowering users to analyze data as it is being generated.

Installation

python -m pip install pyglplot

Getting started

import numpy as np
from pyglplot import line


# Create a Line object
lineSize = 1000
plotLine = line.Line(lineSize)
x = np.linspace(-1, 1, lineSize)
y = np.sin(x)

# Add data to the line
plotLine.updateLine(x, y)

plotLine.run()

Animating a plot

lineSize = 1000

plotLine = line.Line(lineSize)

x = np.linspace(-1, 1, lineSize)
y = 0

def update():
    global y
    y = 0.5*np.sin(10*x) + np.random.rand(lineSize) * 0.1
    plotLine.updateLine(x, y)

plotLine.run(update)

License

MIT

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

pyglplot-0.1.3.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

pyglplot-0.1.3-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page