Plotly Express hover options
Asked Answered
S

1

6

In plotly_express.line the only options I see to modify hover settings are hover_name and hover_data. A few issues I'm facing with modifying hover are:

  1. It seems that even if I set hover_data=None it still shows the values for name,x, and y. How can I set it to only show the hover info I select without adding defaults?

  2. I can't find a setting to modify the opacity for hover boxes. I'm displaying a lot of hover info so my hover box is large, which makes it difficult to know where I am on the plot behind the box.

  3. How can I make it so hovering on one line displays hover info corresponding to a linked data column value on all other lines?

Sackey answered 7/8, 2019 at 20:42 Comment(0)
B
2

1 and 2 are not possible yet.

For 3 there is a hovermode attribute in layout that you can set to show one hover label per trace per y-value.

Banda answered 7/8, 2019 at 21:0 Comment(5)
Thanks. Does it happen to be possible to lock the hover box to a predefined location?Sackey
There’s no feature for that, no.Banda
For hovermode, I see that there's x and y options, but can we use an arbitrary dataframe column instead? For example, I'm plotting precision-recall curves, and I'd like to see matching values of the "detection_threshold" parameter column on other lines while hovering.Sackey
@Sackey if you want to break that out into its own question I’d be happy to help you find an answerBanda
Sure, thanks. Here's a new question: #57526450Sackey

© 2022 - 2024 — McMap. All rights reserved.