I’m trying to convert the Annotator example for an image:
img = hv.Image(np.load('../assets/twophoton.npz')['Calcium'][..., 0]) cells = hv.Points().opts(width=500, height=500, responsive=False, padding=0) hv.annotate(img * cells, annotations=['Label'], name="Cell Annotator")
to use hv.Raster instead of hv.Image, because I need the annotations in numpy/pixel coordinates.
But trying to do so, the image/raster doesn’t show. I think it might have something to do with the y-axis being inverted? I tried to use
invert_yaxis=True as an opts to Raster, but to no avail. Indeed the annotate axis of the annotator inverted the y-axis as well, when I did that.
If annotation is not supported with raster, what’s my workaround, to get the coordinates in numpy index space?