Interactive multidimensional scatterplot Jupyter widget
Project description
Grandscatter
Interactive multidimensional scatterplot widget for Jupyter notebooks. Rotate projection axes by dragging to explore high-dimensional point clouds with correct linear projections at all times.
Built on anywidget and WebGL.
Installation
pip install grandscatter
Quick start
from grandscatter import Scatter
import pandas as pd
df = pd.read_csv("my_data.csv")
widget = Scatter(
df,
axis_fields=["x1", "x2", "x3", "x4", "x5"],
label_field="category",
label_colors={"A": "#e23838", "B": "#2196f3", "C": "#4caf50"},
)
widget
Features
- Interactive axis rotation -- drag axis handles to rotate the projection and explore your data from any angle.
- Orthogonal projections -- the projection matrix is always kept orthonormal, ensuring geometrically correct linear projections.
- Perspective and orthographic modes -- switch between projection types on the fly.
- WebGL rendering -- fast, anti-aliased point rendering with depth sorting.
- Categorical legend -- click legend items to highlight categories.
- Live trait sync -- update properties like
projection,axis_length,view_angle, andbase_point_sizefrom Python and see changes reflected immediately.
API
Scatter(df, axis_fields, label_field, label_colors, **kwargs)
| Parameter | Type | Description |
|---|---|---|
df |
pd.DataFrame |
Input data |
axis_fields |
list[str] |
Column names to use as projection dimensions |
label_field |
str |
Column name for categorical labels |
label_colors |
dict[str, str] or list[str] |
Mapping of category names to hex colors, or a list of colors in category order |
projection |
str |
"orthographic" (default) or "perspective" |
axis_length |
float or None |
Length of axis lines (None for auto) |
camera_z |
float or None |
Camera z-position for perspective mode |
view_angle |
float |
Field of view in degrees (default 45) |
base_point_size |
float |
Point radius in pixels (default 6) |
All keyword parameters are traitlets and can be updated after creation:
widget.projection = "perspective"
widget.base_point_size = 4
widget.view_angle = 90
License
MIT
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
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 grandscatter-0.3.1.tar.gz.
File metadata
- Download URL: grandscatter-0.3.1.tar.gz
- Upload date:
- Size: 70.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4d5480f6b61b5e141ac7fd084e5b7c4e5ff8458ec8199dd481cf8a01d9a9e4f
|
|
| MD5 |
717e5365bc3912bb03f20c297d19e1a2
|
|
| BLAKE2b-256 |
1ea6c8125a2a566f167a3bc30b1d9d3b8305728a80055a09358948879782b975
|
Provenance
The following attestation bundles were made for grandscatter-0.3.1.tar.gz:
Publisher:
publish-pypi.yml on abdenlab/grandscatter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grandscatter-0.3.1.tar.gz -
Subject digest:
f4d5480f6b61b5e141ac7fd084e5b7c4e5ff8458ec8199dd481cf8a01d9a9e4f - Sigstore transparency entry: 1189423311
- Sigstore integration time:
-
Permalink:
abdenlab/grandscatter@b1a52c2a44996a1f44a77319296ab017ee2452a1 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/abdenlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b1a52c2a44996a1f44a77319296ab017ee2452a1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file grandscatter-0.3.1-py3-none-any.whl.
File metadata
- Download URL: grandscatter-0.3.1-py3-none-any.whl
- Upload date:
- Size: 70.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c48e20598685693a4870f6309872d2d87a9efe7f13b445612585a03b4abda270
|
|
| MD5 |
5014e36a4fbf9884aad5482589a41d4e
|
|
| BLAKE2b-256 |
18ef99bbfaab3b0fb40c5ff16eefe8c30b13ffd2bd5fa8462808949382d8e24b
|
Provenance
The following attestation bundles were made for grandscatter-0.3.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on abdenlab/grandscatter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grandscatter-0.3.1-py3-none-any.whl -
Subject digest:
c48e20598685693a4870f6309872d2d87a9efe7f13b445612585a03b4abda270 - Sigstore transparency entry: 1189423319
- Sigstore integration time:
-
Permalink:
abdenlab/grandscatter@b1a52c2a44996a1f44a77319296ab017ee2452a1 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/abdenlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b1a52c2a44996a1f44a77319296ab017ee2452a1 -
Trigger Event:
release
-
Statement type: