How would you add a third right axis data value to the mouse hover x, y values show in the bottom right of matplotlib charts? The right axis was created using ax_right=ax.twinx(). I'd like the bottom right mouse hover area to reflected the additional right axis and show something like x=2022-09, y=-0.401, y2=50.

This question has been flagged as a duplicate. It is not as the other question/answer show an (x1,y1) (x2,y2) configuration. I am looking for a (x1, y1, y2) configuration with x1 formatted as a date. The other answers were helpful and aided me in solving this issue. I will post the code as an answer for anyone with a similar need.

enter image description here

0

There are 0 best solutions below