holoviews
holoviews copied to clipboard
Vectorfield broken hover tooltips
hv.VectorField(([-1, 0, 1, 2, 3], [-1, 0, 1, 2, 3], np.deg2rad([0, 45, 90, 180, 360]))).opts(tools=['hover'])
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
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.
@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.
Still an issue. Any progress?