hvplot
hvplot copied to clipboard
xarray data with multi-index coordinates can not be plotted
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")