holoviz / holoviz/hvplot

hvplot.pandas crashes browser tab when rendering a large number of points with Plotly backend

Open
#1,045 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

#### ALL software version info

Windows 11 Pro 10.0.22621
Vivaldi browser 5.7.2921.63 (Stable channel) (64-bit)
Conda-forge Package Versions:

| Name | Version | Build | Channel |
| --- | --- | --- | --- |
| hvplot | 0.8.2 | pyhd8ed1ab_0 | conda-forge |
| ipywidgets | 8.0.4 | pyhd8ed1ab_0 | conda-forge |
| jupyter_client | 8.0.3 | pyhd8ed1ab_0 | conda-forge |
| jupyterlab | 3.6.1 | pyhd8ed1ab_0 | conda-forge |
| pandas | 1.5.3 | py310h1c4a608_0 | conda-forge |
| plotly | 5.13.1 | pyhd8ed1ab_0 | conda-forge |

#### Description of expected behavior and the observed behavior

I can render a scatter plot of 1 million+ datapoints with the Bokeh backend no problem and when calling Plotly express directly with a dataframe but when attempting to render it with the hvplot using the plotly backend in Jupyter it crashes my browser tab. I was running on a fairly speccy laptop so even though this consumed several hundred meg system memory there was still plenty to spare so it doesn't look like it is directly a memory issue.

#### Complete, minimal, self-contained example code that reproduces the issue

```python
import numpy as np
import pandas as pd
import hvplot.pandas
import plotly.express as px

date_range = pd.date_range(start="2010-01-01", end="2020-01-01", freq="5T")
values = np.random.uniform(low=0.0, high=10.0, size=len(date_range))
df = pd.DataFrame(data={"timestamp": date_range, "values": values})

# This works fine
px.scatter(x=df["timestamp"], y=df["values"], width=1024, height=768)

hvplot.extension("plotly")

# This breaks
df.hvplot.scatter(x="timestamp", y="values", width=1024, height=768)
```

#### Screenshots or screencasts of the bug in action

image

image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.