holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.69k stars 402 forks source link

QuadMesh.sample() does not work #2667

Closed drs251 closed 6 years ago

drs251 commented 6 years ago

Seems QuadMesh is a bit buggy at the moment, even though I would expect it to work more or less the same as Image.

import holoviews as hv
import xarray as xr
xs = np.linspace(0, 6, 50)
ys = xs
XS, YS = np.meshgrid(xs, ys)
values = np.sin(XS)
arr = xr.DataArray(values, coords=(('y', ys), ('x', xs)), name='sine')
hv.Dataset(arr).to(hv.QuadMesh).sample(y=0)

I get

ValueError: 'y' is not in list

It works as expected when I use Image instead of QuadMesh.

(Still on version 1.10.2)

philippjfr commented 6 years ago

Thanks for the bug report, I'm not wholly surprised, QuadMesh was recently upgraded from having its own implementation for all the methods to using the shared Dataset implementation and certain things may have broken in the process.

drs251 commented 6 years ago

OK, I guess that explains why I'm getting the same bug for plain Datasets