holoviz / geoviews

Simple, concise geographical visualization in Python
http://geoviews.org
BSD 3-Clause "New" or "Revised" License
577 stars 75 forks source link

Image -> RGB Extents are not correct after shading #694

Open ahuang11 opened 5 months ago

ahuang11 commented 5 months ago
import xarray as xr
import panel as pn
import geoviews as gv
from holoviews.operation.datashader import shade
gv.extension()

ds = xr.tutorial.open_dataset("air_temperature").isel(time=0)
gv.Image(ds, ["lon", "lat"], ["air"])

After:

shade(gv.Image(ds, ["lon", "lat"], ["air"])).redim.range(lon=(40, 70))
image
TheoMathurin commented 3 months ago

In my experience with datashader and raster data you're better off using hv elements instead to avoid potential issues. When both work it's faster too.