hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

xarray data with multi-index coordinates can not be plotted

Open okz opened this issue 1 year ago • 0 comments

hvplot , 0.9.0 leads to an exception, while plot generates the correct plot for Xarray datasets/data arrays with multiindexed coordinates:

There are a few Multi-indexed issues reported #351, #1036. I am not sure if multi-indexed data is supported at all with hvplot?

minimum example, where plot works, but hvplot leads to an exception

import pandas as pd
import numpy as np
import xarray as xr
import hvplot.xarray

midx = pd.MultiIndex.from_product([[2,4,6], [0, 1]], names=("one", "two"))

mda = xr.DataArray(np.random.rand(6, 3), [("x", midx), ("y", range(3))])

mda.plot(x="one")  

mda.hvplot(x="one")

image

image

okz avatar Nov 17 '23 14:11 okz