On Thu, Mar 1, 2012 at 10:59 AM, Jean-Baptiste Marquette <marquett@iap.fr> wrote:
Dear Python gurus,

I have written the attached script to plot data from SAMP interaction with TOPCAT (http://www.star.bris.ac.uk/~mbt/topcat/).
I select a row on a given table (VOtable format) in TOPCAT, got the message

Selected : file:/Volumes/pepperland/erosdata/cc_all/tm_all.vot 18
Plotting star tm5000k7768

All I obtain on screen is a blank rectangle window without borders and the rainbow wheel. I sampled the python process, file attached as well.
I updated PyQt4 using the latest Mac snapshot and the Qt 4.8 libraries.

Any hint welcome, thanks.

Cheers,
Jean-Baptiste Marquette


Jean,

You have several possible sources of problems here.  I would first make sure that basic matplotlib scripts work using the Qt4Agg backend on your computer.  Test out some regular scripts from the examples section of the documentation.  If they work as expected, then it is probably more likely that there is a problem with one of the other libraries.  Another possible source of trouble may lie with the calls to "sleep".  Because the display libraries are not on a separate process, the sleep could also prevent the figures from being completely rendered.

Personally, I wouldn't even bother with the interactive mode.  Keep it off, and just put the cleanup code after "plt.show()", which is a blocking call.  There is no need to implement your own event loop.

Ben Root