Interactive Plotly Express plotting accessor for xarray
Project description
xarray_plotly
Interactive Plotly Express plotting for xarray
Installation
pip install xarray_plotly
Quick Start
import xarray as xr
import numpy as np
import xarray_plotly # registers the accessor
da = xr.DataArray(
np.random.randn(100, 3).cumsum(axis=0),
dims=["time", "city"],
coords={"time": np.arange(100), "city": ["NYC", "LA", "Chicago"]},
)
# Accessor style
fig = da.plotly.line()
fig.show()
# Or with xpx() for IDE code completion
from xarray_plotly import xpx
fig = xpx(da).line()
Why xpx()? The accessor (da.plotly) works but IDEs can't provide code completion for it. This is because xarray accessors are registered dynamically at runtime, making them invisible to static type checkers. The xpx() function provides the same functionality with full IDE support. This limitation could only be solved by xarray itself, if at all — it may be a fundamental Python limitation.
Documentation
Full documentation: https://fbumann.github.io/xarray_plotly
Roadmap
Planned additions (contributions welcome):
New plot types
histogram()— distribution of DataArray valuesviolin()— richer distribution visualization than box plotsdensity_heatmap()— 2D histograms (x and y as dimensions)density_contour()— 2D density contours (x and y as dimensions)
Enhancements
- WebGL rendering option for
line()andscatter()(large datasets)
Figure utilities (facet/animation-aware)
fill_between()— fill area between two traces (uncertainty bands)sync_axes()— consistent axis ranges across facets and animation framesadd_secondary_x()— secondary x-axis (likeadd_secondary_y())stack()— vertically stack separate figures into subplots
License
MIT
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 xarray_plotly-0.0.14.tar.gz.
File metadata
- Download URL: xarray_plotly-0.0.14.tar.gz
- Upload date:
- Size: 49.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e4b9b8172d06cc5b34ae4edc67f40289d418f96e7dc5a01fccdbfd9ccffc116
|
|
| MD5 |
1ce1d2f8fb83baaffef256fdf5ed8462
|
|
| BLAKE2b-256 |
8e73e7c76767c815b409e5e9a7b9977a859e257b5f887be25c75ce8a206d1a11
|
Provenance
The following attestation bundles were made for xarray_plotly-0.0.14.tar.gz:
Publisher:
release.yml on FBumann/xarray_plotly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xarray_plotly-0.0.14.tar.gz -
Subject digest:
4e4b9b8172d06cc5b34ae4edc67f40289d418f96e7dc5a01fccdbfd9ccffc116 - Sigstore transparency entry: 1066185001
- Sigstore integration time:
-
Permalink:
FBumann/xarray_plotly@1c92a5c064bd1dac776c67fd3fb490bd691cc376 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FBumann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1c92a5c064bd1dac776c67fd3fb490bd691cc376 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file xarray_plotly-0.0.14-py3-none-any.whl.
File metadata
- Download URL: xarray_plotly-0.0.14-py3-none-any.whl
- Upload date:
- Size: 22.4 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 |
773f3eb0acf0c4ce240f5e463e42b8287b8d4d6984a17fd796a39cc592832cfc
|
|
| MD5 |
067e5e46adc09e34a06a83644e6626b7
|
|
| BLAKE2b-256 |
54d3eaed3f605ec731acdaaf86572b73bc1bbb9065e0e8a3c26c886f9d3e9f8c
|
Provenance
The following attestation bundles were made for xarray_plotly-0.0.14-py3-none-any.whl:
Publisher:
release.yml on FBumann/xarray_plotly
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xarray_plotly-0.0.14-py3-none-any.whl -
Subject digest:
773f3eb0acf0c4ce240f5e463e42b8287b8d4d6984a17fd796a39cc592832cfc - Sigstore transparency entry: 1066185205
- Sigstore integration time:
-
Permalink:
FBumann/xarray_plotly@1c92a5c064bd1dac776c67fd3fb490bd691cc376 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FBumann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1c92a5c064bd1dac776c67fd3fb490bd691cc376 -
Trigger Event:
workflow_dispatch
-
Statement type: