It seems the x_range
and y_range
in datashade don’t support transform=ccrs.PlateCarree()
.
How could I set the correct x_range
and y_range
using lon/lat value?
Here’s the example where I want to plot data between 60 N and 90 N.
import xarray as xr
import geoviews as gv
import cartopy.crs as ccrs
import geoviews.feature as gf
from holoviews.operation.datashader import datashade
gv.extension("bokeh")
ds = xr.tutorial.open_dataset('rasm').load()
gvds = gv.Dataset(ds.isel(time=0),
crs=ccrs.PlateCarree(),
)
mesh = gvds.to(gv.QuadMesh, kdims=["xc", "yc"], vdims=['Tair'], extents=(-180, 60, 180, 90))
datashade(gv.project(mesh, projection=ccrs.NorthPolarStereo()),
precompute=True,
cmap='Spectral_r',
dynamic=True,
# y_range=(60, 90),
# x_range=(-180, 180),
)*\
gf.coastline.opts(width=500, height=500,
tools=['hover'],
projection=ccrs.NorthPolarStereo(),
)