Skip to main content

xarray_plotly

Interactive Plotly Express plotting for xarray

PyPI version Python CI Docs License: MIT

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 values
  • violin() — richer distribution visualization than box plots
  • density_heatmap() — 2D histograms (x and y as dimensions)
  • density_contour() — 2D density contours (x and y as dimensions)

Enhancements

  • WebGL rendering option for line() and scatter() (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 frames
  • add_secondary_x() — secondary x-axis (like add_secondary_y())
  • stack() — vertically stack separate figures into subplots

License

MIT

Release files for xarray-plotly 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xarray-plotly 0.0.17
File Size Uploaded
xarray_plotly-0.0.17.tar.gz 62.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xarray-plotly 0.0.17
File Interpreter ABI Platform
xarray_plotly-0.0.17-py3-none-any.whl Python 3 none any Details

Total release size: 91.4 kB

Release files / xarray_plotly-0.0.17.tar.gz

Download URL xarray_plotly-0.0.17.tar.gz
Size 62.3 kB
Tags Source
SHA-256 checksum
How to use checksums
56566bdc28d57be0550108bc174e1b569b261ef52ab420038687ed63b9489df5
BLAKE2b-256 checksum
How to use checksums
f7d3f1a697db9c1913329c00eaf15b6c325def7b3f1232e4301778826a71993d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Release files / xarray_plotly-0.0.17-py3-none-any.whl

Download URL xarray_plotly-0.0.17-py3-none-any.whl
Size 29.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edb3d386aeecb7f3ffe645123625e05057f86a9159b6bfc1b6a55244ff38c0aa
BLAKE2b-256 checksum
How to use checksums
098e5d20130b14c637f9c95b12a2af3b94dda781125e2e6a97de49a400c6cfb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.17 This release

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page