https://github.com/bqplot/bqplot-gl
Plugin to bqplot powered by WebGL
https://github.com/bqplot/bqplot-gl
Last synced: 6 months ago
JSON representation
Plugin to bqplot powered by WebGL
- Host: GitHub
- URL: https://github.com/bqplot/bqplot-gl
- Owner: bqplot
- License: apache-2.0
- Created: 2021-06-22T13:38:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-25T07:04:50.000Z (over 2 years ago)
- Last Synced: 2025-05-11T02:20:08.707Z (8 months ago)
- Language: TypeScript
- Size: 4.21 MB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bqplot-gl
Plugin to bqplot powered by WebGL.
## Installation
```bash
pip install --pre bqplot-gl bqplot
```
## Usage
bqplot-gl provides marks that make use of WebGL for the rendering, providing better performances.
Those marks have the same APIs as their equivalent in bqplot.
```python
from bqplot import *
from bqplot_gl import LinesGL, ScatterGL
import numpy as np
import pandas as pd
n_points = 150_000
np.random.seed(0)
y = np.cumsum(np.random.randn(n_points)) + 100.
sc_x = LinearScale()
sc_y = LinearScale()
scatter = ScatterGL(
x=np.arange(len(y)), y=y,
default_size=1,
scales={'x': sc_x, 'y': sc_y}
)
ax_x = Axis(scale=sc_x, label='Index')
ax_y = Axis(scale=sc_y, orientation='vertical', label='Points')
Figure(marks=[scatter], axes=[ax_x, ax_y], title='Scatter powered by WebGL')
```
[bqplot-gl](https://github.com/bqplot/bqplot-gl/assets/21197331/55b88909-3120-41b6-a3ad-494850407bc7)