holoviews icon indicating copy to clipboard operation
holoviews copied to clipboard

Xarray non dimensional kdims

Open hoxbro opened this issue 4 months ago • 0 comments

Fixes https://github.com/holoviz/holoviews/issues/6131

image

import numpy as np
import holoviews as hv
import xarray as xr
hv.extension("bokeh")

da = xr.DataArray(np.arange(6).reshape(6,1), dims=["x", "stat"], coords={"x": np.arange(6), "stat": ["mean"], "x2": ('x', np.arange(6)/6)})
hv.Curve(da, kdims="x2", vdims="stat")

TODO:

  • [ ] Add test
  • [ ] Check if this is the best way to do it

hoxbro avatar Feb 26 '24 16:02 hoxbro