import numpy as np import holoviews as hv hv.extension('matplotlib') ls = np.linspace(0, 10, 200) xx, yy = np.meshgrid(ls, ls) bounds=(-1,-1,1,1) # Coordinate system: (left, bottom, right, top) img = hv.Image(np.sin(xx)*np.cos(yy), bounds=bounds) img img + img[-0.5:0.5, -0.5:0.5] closest = img.closest((0.1,0.1)) points = hv.Points([closest]) print('The value at position %s is %s' % (closest, img[0.1, 0.1])) img * points.opts(color='black', marker='x', s=60) img.sample(x=0) + img.reduce(x=np.mean)