holoviz / holoviz/hvplot

Downsample with RangeTool source sometimes ignores set height

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

Description

#### ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)

#### Description of expected behavior and the observed behavior
**Sometimes** when **just** the source plot of a RangeToolLink is `downsample=True`, the set height for the source plot is ignored.

In the video below, after setting the target plot `downsample=False`, sometimes when the cell is executed, the height for the source plot is changes.

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

```
import pandas as pd
import numpy as np
import hvplot.pandas
from holoviews.plotting.links import RangeToolLink

n_samples = 1000
data = np.random.randn(n_samples)

df = pd.DataFrame({'time': np.arange(len(data)), 'value': data})
plot = df.hvplot(x="time", y="value", height=400, downsample=False)
minimap = df.hvplot(x="time", y="value", height=150, downsample=True)
link = RangeToolLink(minimap, plot, axes=["x", "y"])

(plot + minimap).opts(shared_axes=False).cols(1)

```

#### Stack traceback and/or browser JavaScript console output

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

https://github.com/holoviz/hvplot/assets/6613202/bf71119b-bd5a-4b91-a406-c9e92b9d633b

- [ ] I may be interested in making a pull request to address this

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.