Hovermode, Custom by like factor

I’d like hover tooltips to highlight all points on a scatterplot which share equal values in a particular column of the referenced dataframe.

That is, rather than reference x, y distances, I’d like comparative rollover highlighting to function based on a ‘label’ to the points. Does anyone know a method to achieve this? Could the “distance” between points be faked programmatically?

I’m not entirely sure what your desired output is but maybe you are looking for layout(hovermode = "y unified")?

I’d like to have two datapoints linked by a common label or factor so that when I rollover one, I can see its “twin” highlighted, regardless of where it is. That is, the x and y values of the twin may be near or far, but I’d like to see it highlighted anyway.

The use case is comparing course of study offerings between campuses. If I mouse over ECON101 for campus A, I’d like to see the campus B datapoint highlighted at the same time.

Sounds like a Job for crosstalk.

Thanks for the tip, I’ll have a look.