Skip to main content

Bringing interactivity to plotnine

Project description

ninejs logo

ninejs

Coverage Python Versions

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 lines of code!

See examples.


Quick start

from plotnine import aes, geom_point, ggplot, theme_minimal
from plotnine.data import anscombe_quartet

from ninejs import interactive, save

gg = (
  ggplot(
      anscombe_quartet,
      aes(x="x", y="y", color="dataset", tooltip="dataset", hover_group="dataset")
  )
  + geom_point(size=7, alpha=0.5)
  + theme_minimal()
)

interactive(gg) + save("plot.html")

Interactive scatterplot of Anscombe's quartet grouped by dataset with a visible tooltip


Installation

pip install ninejs

Documentation

See the full documentation and examples here.

See the contributing guide for local setup, tests, and formatting.

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

ninejs-0.1.0.tar.gz (9.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ninejs-0.1.0-py3-none-any.whl (181.7 kB view details)

Uploaded Python 3

File details

Details for the file ninejs-0.1.0.tar.gz.

File metadata

  • Download URL: ninejs-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ninejs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 229f92efab2c3f7ecf72bfdfe7d38b92f079bcf5458644334ec3cfd47098e308
MD5 f22f4d901e225ed093df471fc152bf72
BLAKE2b-256 49f60ee848ba946dc53817fe6710b0a266047b4499a881b0a1b1d6de1c70f2de

See more details on using hashes here.

Provenance

The following attestation bundles were made for ninejs-0.1.0.tar.gz:

Publisher: pypi.yaml on y-sunflower/ninejs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ninejs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ninejs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 181.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ninejs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6b36dd977a3b4940b1e02c98dc420a295ac611cd00028a1e8abca888976bde9
MD5 1032e54d39c11d8bec77fe5224f2a872
BLAKE2b-256 eff46b3d67a2ea94be667a946a801c0a2de401481ef097e3715127f9343782a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ninejs-0.1.0-py3-none-any.whl:

Publisher: pypi.yaml on y-sunflower/ninejs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page