kivy-garden / garden.matplotlib

Matplotlib backends using kivy
MIT License
103 stars 50 forks source link

motion_notify_event causes app to freeze #19

Open dessant opened 9 years ago

dessant commented 9 years ago

This code works with other backends, the color of the line and labels changes on hover.

import matplotlib
matplotlib.use('module://kivy.garden.matplotlib.backend_kivy')

import numpy as np
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(np.random.rand(10))
ax.set_title('hover over me')
ax.set_xlabel('or me')
ax.set_ylabel('or me')
ax.grid()
fig.canvas.mpl_connect('motion_notify_event', fig.canvas.onHilite)

plt.show()
andnovar commented 9 years ago

This seems like a bug I will go over it this weekend. From what I see the draw_idle is calling too much draw() I added a Clock.schedule_once on the draw_idle but it is still very slow, but does not freeze.

dessant commented 9 years ago

@andnovar, have you found a fix for this issue?

lkjell commented 7 years ago

Does this have any connection why panning the graph is so slow?