update plot in regular intervals while catching mouse/keyb events

Hi, I want to capture mouse and keyboard events on a plot while updating it in regular intervals.
I succeeded doing both tasks independently however not in combination.
For the updating I use a subthread to analyze the data while the main thread redraws the plot in a loop. However while redrawing it doesn’t capture any other events. When I put a simple sleep in the redrawing thread it shows the same behavior.

Is there a way to fix this?