Metadata-Version: 2.4
Name: glplot
Version: 0.1.2
Summary: High-performance OpenGL plotting library for Python
Project-URL: Homepage, https://github.com/AkarisDimitry/GLPlot
Project-URL: Repository, https://github.com/AkarisDimitry/GLPlot
Project-URL: Issues, https://github.com/AkarisDimitry/GLPlot/issues
Author-email: Juan Manuel Lombardi <lombardi@fhi-berlin.mpg.de>
License: MIT
License-File: LICENSE
Keywords: gpu,opengl,plotting,scientific plotting,visualization
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: glfw
Requires-Dist: imgui
Requires-Dist: imgui[glfw]
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: pyopengl
Requires-Dist: scipy
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-mock; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-mock; extra == 'test'
Description-Content-Type: text/markdown

# GLPlot

High-performance, GPU-accelerated plotting library in Python, designed to handle **millions** of lines effortlessly. It provides an API similar to Matplotlib but runs natively over an OpenGL/GLFW backend, performing instanced rendering directly on the GPU.

## Features
- **Matplotlib API Compatibility**: Familiar `plot(x, y)`, `show()`, `savefig()`.
- **Phase Diagram Optimized (`plot_lines`)**: Explicitly supports passing millions of line parameters $(a, b)$ to calculate functions $y = ax + b$ securely bounded to bounds using shader math.
- **Logarithmic Density Heaps**: By displaying overlaps, `density=True` handles millions of parallel curves seamlessly for heatmaps.
- **Dynamic Camera**: Drag to pan, scroll to zoom with on-the-fly resolution subsampling.

## Installation

You can install this locally:

```bash
pip install .
```

Requirements: `numpy`, `glfw`, `PyOpenGL`, `scipy`, `matplotlib`.

## Usage

**Traditional Polylines**
```python
import numpy as np
import glplot.pyplot as gplt

x = np.linspace(0, 10, 100)
y = np.sin(x)

gplt.figure("Sine Wave")
gplt.plot(x, y, color=(1.0, 0.0, 0.0, 1.0))
gplt.show()
```

**Bulk Lines (Density Map)**
```python
import numpy as np
import glplot.pyplot as gplt

N = 1000000
a = np.random.randn(N)
b = np.random.randn(N)

gplt.figure("Density")
gplt.plot_lines(a, b, x_range=(-2, 2))
gplt.show(density=True)
```

## Testing

Uses `pytest` covering 100% of the internal application logic without popping visible windows:
```bash
pytest
```
