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?

Austin
  • 6,921
  • 12
  • 73
  • 138

1 Answers1

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.

nicolaskruchten
  • 26,384
  • 8
  • 83
  • 101
  • Thanks. Does it happen to be possible to lock the hover box to a predefined location? – Austin Aug 07 '19 at 21:11
  • 1
    There’s no feature for that, no. – nicolaskruchten Aug 07 '19 at 21:12
  • 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. – Austin Aug 14 '19 at 14:49
  • 1
    @Austin if you want to break that out into its own question I’d be happy to help you find an answer – nicolaskruchten Aug 14 '19 at 17:42
  • Sure, thanks. Here's a new question: https://stackoverflow.com/questions/57525950/plotly-express-hovermode-with-arbitrary-column – Austin Aug 16 '19 at 13:59