https://github.com/jupyter-widgets-contrib/ipycanvas
Interactive Canvas in Jupyter
https://github.com/jupyter-widgets-contrib/ipycanvas
canvas canvas2d interactive-visualizations jupyter jupyterlab
Last synced: about 1 month ago
JSON representation
Interactive Canvas in Jupyter
- Host: GitHub
- URL: https://github.com/jupyter-widgets-contrib/ipycanvas
- Owner: jupyter-widgets-contrib
- License: bsd-3-clause
- Created: 2019-07-06T12:55:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T18:12:15.000Z (8 months ago)
- Last Synced: 2025-04-11T14:21:33.180Z (2 months ago)
- Topics: canvas, canvas2d, interactive-visualizations, jupyter, jupyterlab
- Language: Python
- Homepage: https://ipycanvas.readthedocs.io/en/latest/
- Size: 6.25 MB
- Stars: 701
- Watchers: 9
- Forks: 63
- Open Issues: 62
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-jupyter-widgets - ipycanvas - interactive drawing canvas using the browser's canvas API (Interactive Widgets / Interactive Jupyter Widget Ecosystem)
README
ipycanvas
Interactive Canvas in Jupyter
[](https://ipycanvas.readthedocs.io/en/latest/?badge=latest)
[](https://mybinder.org/v2/gh/jupyter-widgets-contrib/ipycanvas/stable?urlpath=lab%2Ftree%2Fexamples)
[](https://ipycanvas.readthedocs.io/en/latest/lite/lab)
[](https://pepy.tech/project/ipycanvas)
[](https://gitter.im/jupyter-widgets-contrib/ipycanvas?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)ipycanvas is a lightweight, fast and stable library exposing the [browser's Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) to IPython.
It allows you to draw simple primitives directly from Python like text, lines, polygons, arcs, images etc. This simple toolset allows you to draw literally anything!## Try it online!
You can try it online by clicking on this badge:
[](https://mybinder.org/v2/gh/jupyter-widgets-contrib/ipycanvas/stable?urlpath=lab%2Ftree%2Fexamples)
## Documentation
You can read the documentation following this link: https://ipycanvas.readthedocs.io
## Questions?
If you have any question, or if you want to share what you do with ipycanvas, [start a new discussion on Github](https://github.com/jupyter-widgets-contrib/ipycanvas/discussions/new)!
Or join the gitter channel: [](https://gitter.im/jupyter-widgets-contrib/ipycanvas?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Installation
You can install using `pip`:
```bash
pip install ipycanvas orjson
```Or using `conda`:
```bash
conda install -c conda-forge ipycanvas
```And if you use jupyterlab <= 2:
```bash
conda install -c conda-forge yarn
jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas
```A development installation guide, can be found [here](https://ipycanvas.readthedocs.io/en/latest/installation.html#development-installation)
## Examples
### Create John Conway's Game Of Life

### Give a "hand-drawn" style to your drawings using the RoughCanvas

### Draw Particles from IPython

### Custom Sprites

### Draw data directly from a NumPy array

### Create your own plotting library **fully** in Python
