Hello HoloViz community, I am encountering an issue when trying to include custom coordinates (xind
and yind
) in tooltips while using hvplot.image()
. Here is a simplified version of my code:
import hvplot.xarray
sample_data = np.random.rand(500, 128)
y_coord = np.linspace(0, 15, 500)
x_coord = np.linspace(0, 1, 128)
data = xr.DataArray(data=sample_data.T, coords=[("y", x_coord), ("x", y_coord)])
xindex = np.arange(len(x_coord))
yindex = np.arange(len(y_coord))
data = data.assign_coords(xind=("x", yindex))
data = data.assign_coords(yind=("y", xindex))
plot = data.hvplot.image(
z="value",
x="x",
y="y",
cmap="gray",
width=1200,
height=300,
hover=True,
xlabel="x (mm)",
ylabel="y (m)",
framewise=True,
rasterize=True,
)
When attempting to include xind
and yind
coordinates in tooltips using hover_cols=["xind","yind"]
, I encounter the following error:
ValueError: 'y' is not in list
Is there any way, I could use xind and yind in my tooltips?