I’m using rasterise and TriMesh together with data shader to plot irregularly gridded data:
simplices = coupler_elements.loc[mesh.no_cyclic_elem] nodes = gv.Points(coupler_data_df, vdims=["Ocean Hydr."]) trimesh = gv.TriMesh((simplices, nodes), crs=ccrs.PlateCarree()) projected_trimesh = gv.project(trimesh, projection=ccrs.Robinson()) rasterize(projected_trimesh).opts( # Tools: tools=['hover'], # Figure Height/Width: width=800, height=500, # Projection: projection=ccrs.Robinson(), # Colorbar: colorbar=True, cmap=cmocean.cm.ice_r, colorbar_position="bottom", clabel="Hydrological Discharge in Ocean")
This works nicely, and I get a map. However, when I zoom in, the triangular elements aren’t re-rendered with the new resolution. I could have sworn I had this working before, but I can’t find the notebook I made… perhaps something like this would therefore be good to include in the documentation? I’d be happy to contribute an example!
Any hints would be appreciated!