Bringing interactivity to plotnine
Project description
Bringing ✨interactivity✨ to plotnine.
ninejs adds interactive behavior to plotnine charts with a minimal API. You can attach tooltips, hover grouping, and on click events directly from aes(), then export the result as a standalone HTML plot. All of this with just 2 or 3 lines of code!
- Works out of the box with Jupyter, Quarto, Marimo, and Shiny
- Includes a built-in preview in Positron
- Supports custom CSS and JS
- Copy-pastable self contained documentation for AI and agents
See examples.
Quick start
from plotnine import aes, geom_point, ggplot, theme_minimal
from plotnine.data import anscombe_quartet
from ninejs import css, interactive, save
gg = (
ggplot(
anscombe_quartet,
aes(x="x", y="y", color="dataset", tooltip="dataset", data_id="dataset")
)
+ geom_point(size=7, alpha=0.5)
+ theme_minimal()
)
(
interactive(gg)
+ css(from_dict={".tooltip": {"font-size": "2em"}})
+ save("plot.html")
)
Installation
pip install ninejs
Documentation
See the full documentation and examples here.
See the contributing guide for local setup, tests, and formatting.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ninejs-0.0.10.tar.gz.
File metadata
- Download URL: ninejs-0.0.10.tar.gz
- Upload date:
- Size: 4.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6344b4f7d2848091b1cff8d81c0f348fc87ab6677716335757c36a183f9107a6
|
|
| MD5 |
2a56a3f1f737a94cead24344751bdfb8
|
|
| BLAKE2b-256 |
a5e0414a01aff9fac336b6a66ef1f4a95c7dd573cc9f29be8f82c1f24307cdd8
|
Provenance
The following attestation bundles were made for ninejs-0.0.10.tar.gz:
Publisher:
pypi.yaml on y-sunflower/ninejs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ninejs-0.0.10.tar.gz -
Subject digest:
6344b4f7d2848091b1cff8d81c0f348fc87ab6677716335757c36a183f9107a6 - Sigstore transparency entry: 1625063000
- Sigstore integration time:
-
Permalink:
y-sunflower/ninejs@09d37b8b1099dc847b70e2916e4e074178b406e4 -
Branch / Tag:
refs/tags/v0.0.10 - Owner: https://github.com/y-sunflower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@09d37b8b1099dc847b70e2916e4e074178b406e4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ninejs-0.0.10-py3-none-any.whl.
File metadata
- Download URL: ninejs-0.0.10-py3-none-any.whl
- Upload date:
- Size: 171.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc2bcd981e5a9324d34905cc42e0825416afe6fd0f050e9fe72e6bd6b91aa086
|
|
| MD5 |
188efdaf0a98e3e6c1d171ccc5daf7fc
|
|
| BLAKE2b-256 |
4bf2819a281aa4f9db2c245f20689f3fa1deb0c4f2b3f24453dd18a2946155d8
|
Provenance
The following attestation bundles were made for ninejs-0.0.10-py3-none-any.whl:
Publisher:
pypi.yaml on y-sunflower/ninejs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ninejs-0.0.10-py3-none-any.whl -
Subject digest:
fc2bcd981e5a9324d34905cc42e0825416afe6fd0f050e9fe72e6bd6b91aa086 - Sigstore transparency entry: 1625063031
- Sigstore integration time:
-
Permalink:
y-sunflower/ninejs@09d37b8b1099dc847b70e2916e4e074178b406e4 -
Branch / Tag:
refs/tags/v0.0.10 - Owner: https://github.com/y-sunflower
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@09d37b8b1099dc847b70e2916e4e074178b406e4 -
Trigger Event:
push
-
Statement type: