2.5 years later, I’m hitting this same problem. My workaround is to convert the xarray to a pandas dataframe, and then use points. But I’ll raise this as an issue on hvplot.
import numpy as np
import xarray as xr
import hvplot.xarray
import hvplot.pandas
ds = xr.Dataset({
'lat': ('trajectory', np.linspace(30, 35, 15)),
'lon': ('trajectory', np.linspace(16, 20, 15))
})
This doesn’t work, giving: KeyError: 'lon'
ds.hvplot.points(x='lon', y='lat', geo=True, tiles='OSM')
But this does work:
ds.to_dataframe().hvplot.points(x='lon', y='lat', geo=True, tiles='OSM')
I just raised an issue