interactive plots again

Maybe I have reinvented the wheel, but I find the attached code snippet
very useful.
I have modified a bit the recipe at
to be used in the following situation:

You plot (interactively) something in a main program, which than works
heavily. Normally, when the figure window gets obscured, it will not
redraw. The attached code shows how to make a thread that periodically
redraws the figure.

r. (2.12 KB)