Plotly Express hovermode with arbitrary column
Asked Answered
B

1

1

I see that the hovermode attribute in layout has options for x or y, but is it possible to use an arbitrary dataframe column? instead?

For example, I'm plotting precision-recall curves. The x-axis is recall, and the y-axis is precision. The independent variable is a detection threshold value (with range of np.linspace(0,1.0,101)) with a column in my dataframe called threshold. When I hover over a precision-recall point, what I'm interested in is points on other curves with the same detection threshold value. So can I instead hover on this column?

Braunite answered 16/8, 2019 at 13:58 Comment(2)
So you have multiple precision-recall curves in this context?Caterina
Yes, one for each class label, and then a micro-averaged curve as wellBraunite
C
0

No, there’s no feature for that at the moment. You could consider a second set of “iso-threshold” curves to see this kind of thing perhaps?

Caterina answered 16/8, 2019 at 16:56 Comment(1)
I have been considering iso-threshold curves, although the downsides are clutter (one of the reasons I wanted to use interactive plots in the first place) and needing to deselect/select two matching legend items for each.Braunite

© 2022 - 2024 — McMap. All rights reserved.