TkAgg freezing, problems with backend

I have strange behavior when using TkAgg on a script which produces plots repeatedly. On the first instance of the plotting, the Figure window is not interactive, and needs to be ‘killed’ by clicking the x in the top right (this is on XP, by the way). On subsequent calls, it seems fine.

What’s is strange is when I run it in a debugging environment such as Wing or otherwise, after it’s ‘killed’ the first time I can use close() to close it, but not on the first instance. Could this be related to not using the figure() command? I usually just call with functions like plot(x) or imshow(x) or contour(x) etc…