A type safe and backend independent plotting library for Python.
Project description
whitecanvas
A type safe and backend independent plotting library for Python.
matplotlib | pyqtgraph | |
---|---|---|
Rain-cloud plot in different backends (Source code) | ||
vispy | plotly | bokeh |
Installation
pip install whitecanvas -U
Type safety
In whitecanvas
, each component is configured separately by with_*
methods.
This architecture makes function arguments highly consistent and allows you to
write type-safe codes.
import numpy as np
from whitecanvas import new_canvas
canvas = new_canvas() # make a new canvas
# sample data
N = 10
xdata = np.linspace(0, np.pi * 2, N)
ydata = np.sin(xdata)
# add layer
layer = (
canvas
.add_line(xdata, ydata, color="blue")
.with_markers(color="violet", symbol="s")
.with_edge(color="blue")
.with_yerr(np.ones(N) / 3, capsize=0.2, color="black")
)
canvas.show() # show canvas
Backend independency
One of the ultimate goal of whitecanvas
is "visualize data everywhere".
Currently supported backends are:
matplotlib
pyqtgraph
vispy
plotly
bokeh
If you want other backends, please feel free to open an issue.
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
whitecanvas-0.1.0.tar.gz
(4.4 MB
view hashes)
Built Distribution
whitecanvas-0.1.0-py3-none-any.whl
(153.2 kB
view hashes)
Close
Hashes for whitecanvas-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9c8629f1c30c72dc73ff9f0af0bb602fc72c79322e9210bbdb19290d40ff0d2 |
|
MD5 | 1e9dc9ee380d47f0e327dbafbc0cd431 |
|
BLAKE2b-256 | c9ce7f9096754a969f38beee46bf4c959c802a8726cf7da99773386ba6bcf562 |