How can I display the name of each point based on x- and y- coordinate of my cursor?
If I actually want the displayed value to be different, how can I change that? For instance, I am plotting the 5th and 6th column of a dataframe (see image below), but when I hover over the points, I want to display the corresponding values in the 3rd and 4th column:
Thank you, I was able to add the name to the points. However the plots are still not displaying the node that is closest to my cursor. Do you know how to fix this?
Yes there’s something fishy going on with the plotly hovers and the mouse position, always have been. Not even sure this is Plots creating trouble or happens in plotly itself.
It’s actually really annoying, but not sure how to fix.
Hey, I found a fix. there is a function within the plots backend that otuputs SyncPlot to be used in relayout. Also note that relayout is called without the “!”
using Plots
using PlotlyJS: relayout
plotlyjs()
x = rand(10)
y = rand(10)
p = Plots.plot(x, y)
PlotlyJS.relayoutPlots.plotlyjs_syncplot(p), hovermode="closest")