0

I have the following code. The Button widget is not responding to hover event. What am I doing wrong?

from matplotlib import pyplot as plot
from matplotlib.widgets import Button

plot.plot([1,2,3], [1,2,3])
ax = plot.axes([0.5, 0.5, 0.05, 0.05])
Button(ax, "A", hovercolor="red")

plot.show()
3
  • what response do you expect? When I run it on my LInux then it changes color on hover. Commented Jun 21, 2021 at 14:23
  • I am running on Windows and the color is not getting changed when I move the mouse over it Commented Jun 22, 2021 at 8:45
  • code works for me on Linux. On different systems matplotlib may use different GUI framework or system widgets and this may not work on some systems. Commented Jun 23, 2021 at 13:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.