Registry / data / plotly-resampler

plotly-resampler

JSON →
library0.11.0pypypiunverified

Plotly-resampler is a Python library designed for visualizing large time series datasets efficiently with Plotly. It extends Plotly's capabilities by dynamically resampling data based on the zoom level, ensuring smooth performance even with millions of data points. The current version is 0.11.0, and the project maintains an active development pace with frequent releases.

pip install plotly-resampler
INSTALL
IMPORT
SIG · PLOTLY-RESAMPLER
P
plotly-resampler
datapythonv0.11.0
Install
13.0s avg
Import
1512ms
Disk
292MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.11.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 0.613s · 286MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 13.0s · import 0.597s · 278MB
292MB installed
● package 292MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FigureResampler
from plotly_resampler import FigureResampler
from plotly_resampler import FigureResampler

This quickstart demonstrates how to create a `FigureResampler` instance to visualize a large time series dataset. It wraps a standard `plotly.graph_objects.Figure` and uses the `add_trace` method with `hf_x` and `hf_y` arguments to enable dynamic resampling.

import pandas as pd import numpy as np from plotly_resampler import FigureResampler import plotly.graph_objects as go # Create some large time series data n_points = 1_000_000 time_index = pd.date_range("2020-01-01", periods=n_points, freq="S") data_y = np.cumsum(np.random.randn(n_points)) # Initialize FigureResampler, wrapping a Plotly figure fig = FigureResampler(go.Figure()) # Add a trace with resampling enabled by providing hf_x and hf_y fig.add_trace(go.Scattergl(name='High-Frequency Data'), hf_x=time_index, hf_y=data_y) # Show the figure (opens in browser or displays in compatible environments) fig.show()
Debug
Known issues
breakingThe `check_nans` argument was removed from the `FigureResampler` constructor and its `add_traces` method. NaN handling is now delegated entirely to the specific aggregators via their `nan_policy` argument.
fix
Remove `check_nans` from your calls. Configure NaN handling via the `nan_policy` argument of your chosen aggregator (e.g., `MinMax(nan_policy='drop')`).
affects: >=0.10.0
breakingThe default aggregation backend was switched from a custom C implementation (and previously `lttbc`) to `tsdownsample`. This significantly changed the underlying resampling logic and dependencies.
fix
Ensure `tsdownsample` is installed. Review custom aggregation logic if you were relying on internal details of previous backends. Most users will benefit from improved performance and reduced compilation issues.
affects: >=0.9.0
gotchaThe `register_plotly_resampler()` class method was introduced, allowing dynamic resampling to be applied automatically to all `plotly.graph_objects.Figure` instances globally. This changes the typical usage pattern from explicitly wrapping figures to a more 'set-and-forget' approach.
fix
Decide whether to explicitly instantiate `FigureResampler` or use `FigureResampler.register_plotly_resampler()` at the start of your script/application for global effect. Be aware that global registration affects all `go.Figure` objects.
affects: >=0.7.0
gotchaOptional dependencies `kaleido` (for static image export) and `flask-cors` (for web app integration) are no longer installed by default. If you need these functionalities, you must install them explicitly.
fix
To get these dependencies, use `pip install plotly-resampler[full]` or `pip install 'plotly-resampler[kaleido]'` / `pip install 'plotly-resampler[flask-dash]'` as needed.
affects: >=0.8.3.2
Upgrade
Version history
0.11.0latest on PyPI · released Aug 29, 2025
Audit
Dependencies
plotlyrequiredCore dependency for plotting functionality.
tsdownsamplerequiredPrimary backend for fast data aggregation and resampling (since v0.9.0).
kaleidooptionalOptional, required for static image export of figures (e.g., .png, .jpeg).
flask-corsoptionalOptional, often used for enabling Cross-Origin Resource Sharing in web applications built with Dash/Flask.
Agent activity
29 hits · last 30 days
node
24
OpenAI (training)
2
Amazon
1
Resources
plotly-resampler — pip install plotly-resampler · libregistry