Skip to content

Instantly share code, notes, and snippets.

@jsta
Created March 4, 2021 20:46
Show Gist options
  • Save jsta/42e70b448a97dfd663da76fda0a9f287 to your computer and use it in GitHub Desktop.
Save jsta/42e70b448a97dfd663da76fda0a9f287 to your computer and use it in GitHub Desktop.
*Simple* example of plotting an xarray object with holoviews showing values on mouseover
import holoviews as hv
import xarray as xr
hv.extension('bokeh')
test = xr.open_rasterio(raster_file)
gg = hv.Image(test, kdims = ['x', 'y'])
gg.opts(opts.Image(tools=['hover']))
hv.save(gg, 'curve.html', backend='bokeh')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment