matplotlib windows start in background on Mac OS X

Hello,

I'm using matplotlib through MacPorts (py26-matplotlib
@1.0.1_2+tkinter) on Mac OS X 10.6.8. If I run pylab.show() from a
script, the plot window starts up in the background rather than taking
focus. Is anyone else seeing this behavior or have ideas as to
workarounds?

There's a Raise function in wxWidgets that could in theory bring the
window into focus, but I'm not sure how to get access to the
appropriate object to call Raise on.

Thanks,
Geoffrey

Hi,

Just for reference this windowing issue has been brought up before and appears to be an issue on other backends/OSs:

http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18200.html

The last reply in the thread suggests that controlling this behavior can be done, but needs someone with enough motivation to do it. Every few months, I get annoyed enough with the current behavior that I look into trying to make the suggested changes; soon after, I realize that I’m terrible at GUI programming.

Best,

-Tony

···

On Fri, Jul 8, 2011 at 5:11 PM, Geoffrey Irving <irving@…3664…> wrote:

Hello,

I’m using matplotlib through MacPorts (py26-matplotlib

@1.0.1_2+tkinter) on Mac OS X 10.6.8. If I run pylab.show() from a

script, the plot window starts up in the background rather than taking

focus. Is anyone else seeing this behavior or have ideas as to

workarounds?