Skip to main content

A type safe and backend independent plotting library for Python.

Project description

whitecanvas

PyPI - Version PyPI - Python Version

A type safe and backend independent plotting library for Python.

Documentation

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


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)

Uploaded Source

Built Distribution

whitecanvas-0.1.0-py3-none-any.whl (153.2 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