https://github.com/hanjinliu/whitecanvas
A type safe and backend independent plotting library for Python.
https://github.com/hanjinliu/whitecanvas
bokeh matplotlib plot plotly pyqtgraph vispy
Last synced: 8 months ago
JSON representation
A type safe and backend independent plotting library for Python.
- Host: GitHub
- URL: https://github.com/hanjinliu/whitecanvas
- Owner: hanjinliu
- License: bsd-3-clause
- Created: 2023-11-13T15:43:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-08T11:54:42.000Z (over 1 year ago)
- Last Synced: 2025-03-29T23:09:06.995Z (about 1 year ago)
- Topics: bokeh, matplotlib, plot, plotly, pyqtgraph, vispy
- Language: Python
- Homepage: https://hanjinliu.github.io/whitecanvas/
- Size: 35.7 MB
- Stars: 70
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# whitecanvas
[](https://pypi.org/project/whitecanvas)
[](https://pypistats.org/packages/whitecanvas)
[](https://codecov.io/gh/hanjinliu/whitecanvas)
[](https://pypi.org/project/whitecanvas)
A type safe and backend independent plotting library for Python, aiming at not the simplest, but the tidiest API.
## Installation
```console
pip install whitecanvas -U
```
## Project Philosophy
#### Type safety
All the methods should be designed to have nice signature, and should return the same
type of object, so that your program can be statically checked by the IDE.
#### Backend independency
Every plotting library has their own strength and weakness. Same code should work on
different backends, so that you can choose the best one for different purposes.
Currently supported backends are `matplotlib`, `pyqtgraph`, `vispy`, `plotly` and
`bokeh`. If you want other backends, please feel free to
[open an issue](https://github.com/hanjinliu/whitecanvas/issues).
#### API tidiness
Most of (probably all of) the plotting libraries rely on the large
number of arguments to configure the plot elements. They are usually hard to remember,
forcing you to look up the documentation every time you want to make a plot.
`whitecanvas` tries to organize the methods, namespaces and arguments carefully so that you can make any kind of plot only with the help of the IDE's auto-completion and
suggestions.
## Documentation
Documentation is available [here](https://hanjinliu.github.io/whitecanvas/).
## Examples
[→ Find more examples](https://github.com/hanjinliu/whitecanvas/blob/main/examples)
#### Rain-cloud plot in matplotlib
[→ source](https://github.com/hanjinliu/whitecanvas/blob/main/examples/raincloud_plot.py)

#### Super plot in matplotlib
[→ source](https://github.com/hanjinliu/whitecanvas/blob/main/examples/superplot.py)

#### Joint plot in matplotlib
[→ source](https://github.com/hanjinliu/whitecanvas/blob/main/examples/joint_grid.py)

#### Heatmap with text in pyqtgraph
[→ source](https://github.com/hanjinliu/whitecanvas/blob/main/examples/heatmap_with_text.py)

#### Curve fitting in bokeh
[→ source](https://github.com/hanjinliu/whitecanvas/blob/main/examples/curve_fit.py)

-----