Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Feb 26, 2024

Fixes #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 hoxbro force-pushed the xarray_non_dimensional branch from d6d49cb to 4571b91 Compare February 26, 2024 16:21
@hoxbro hoxbro added the type: bug Something isn't correct or isn't working label Feb 26, 2024
@hoxbro hoxbro marked this pull request as draft February 26, 2024 16:23
@hoxbro hoxbro force-pushed the xarray_non_dimensional branch from 348f6c6 to 4e7b3f7 Compare February 27, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support using xarray non-dimensioned coordinates as explicit kdims.
1 participant