holoviz / holoviz/hvplot

Setting individual color ranges for panels does not work when "adding" plots

Open
#544 4 comments 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
- python = 3.7.9
- hvplot = 0.7.0
- bokeh = 2.2.3
- jupyterlab = 2.2.9

#### Description of expected behavior and the observed behavior
When I plot DataArrays such as `DA1.hvplot(title="DA1", clim=(0, 1)) + DA2.hvplot(title="DA2", clim=(0, 2))`, thus explicitly giving each plot its own different color range, the color ranges are still the same.

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

```
from matplotlib import pyplot as plt
import xarray as xr
import numpy as np
import bokeh
import jupyterlab
import jupyter
import hvplot.xarray # To plot interactively with one line
import holoviews as hv

x_arr = np.linspace(0, 1)
x = xr.DataArray(x_arr, dims=['x'], coords=dict(x=x_arr))
y = xr.DataArray(x_arr, dims=['y'], coords=dict(y=x_arr))

DA1 = x*y
DA2 = x+y

(DA1.hvplot(title="DA1", clim=(0, 1)) + DA2.hvplot(title="DA2", clim=(0, 2))).cols(1)
```

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

The code above produces the following output:

![Screenshot from 2021-01-08 09-51-17](https://user-images.githubusercontent.com/13205162/104047823-205fe880-5197-11eb-9aaa-98f97ceea429.png)

As you can see both plots have a color range of `[0, 2]`, in spite of me explicitly setting one of them to a `[0,1]` range.

Am I missing something here or is this really a bug?

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.