holoviews icon indicating copy to clipboard operation
holoviews copied to clipboard

Vectorfield broken hover tooltips

Open ahuang11 opened this issue 6 years ago • 3 comments
trafficstars

hv.VectorField(([-1, 0, 1, 2, 3], [-1, 0, 1, 2, 3], np.deg2rad([0, 45, 90, 180, 360]))).opts(tools=['hover'])

ahuang11 avatar Jun 19 '19 20:06 ahuang11

hv.VectorField(([-1, 0, 1, 2, 3], [-1, 0, 1, 2, 3], np.deg2rad([0, 45, 90, 180, 360]))).opts(tools=['hover'])

@ahuang11 Were you able to resolve this issue? If you have found a solution, it would be great if you could share.

In the meantime, here's a work-around, in case it is useful for anyone. It may require more thought in different cases though...

import holoviews as hv
hv.extension('bokeh')

# data
x, y = [-1, 0, 1, 2, 3], [-1, 0, 1, 2, 3]
angle = [0]+[2*3.14/n for n in [8,4,2,1]] # np.deg2rad([0, 45, 90, 180, 360])

# holoviews
field = hv.VectorField((x,y, angle))
heatmap = hv.HeatMap((x,y, angle), vdims=['angle']) # a temporary work-around for VectorField hover 

# viz
field * heatmap.opts(alpha=0, tools=['hover']) # alpha set to zero to hide the heatmap

eldad-a avatar Jun 22 '20 06:06 eldad-a

I resorted to a similar workaround as I was unable to make the tooltips work, except for x and y with a custom Bokeh HoverTool.

TheoMathurin avatar Jan 12 '22 15:01 TheoMathurin

@philippjfr or @jlstevens, do you guys know where to look if I would like to fix this properly? The proposed workaround doesn't work well either.

basnijholt avatar Jun 06 '22 16:06 basnijholt

Still an issue. Any progress?

dwr-psandhu avatar Oct 15 '22 17:10 dwr-psandhu