On Wed, Jan 7, 2009 at 7:57 AM, Lewis, Ambrose J. <ambrose.j.le...@saic.com> wrote: > Hi All: > > I'm very new to matplotlib, but it seems like a very powerful tool! > > I'm trying to write a wxpython GUI that displays an image from a data file > that the user selected. I've looked at a bunch of examples, but can't seem > to get it quite right. I've initialized the image to a buffer of zeros, but > can never get it to display the new data! > > Any/all help & suggestions are greatly appreciated!!!
You might try simplifying the problem to see if it is matplotlib, your image data, your use of animation or wx. Ie, with *your* image data, can you get the image to update in the pylab shell In [1]: ax = subplot(111) In [2]: data = np.random.rand(10,5) In [3]: im = ax.imshow(data) In [4]: ax.figure.canvas.draw() In [5]: data2 = np.random.rand(10,5) In [6]: im.set_array(data2) In [7]: ax.figure.canvas.draw() If not, perhaps there is some massaging of the raw data that is needed. If that works, try taking the animation calls out of the loop (don't set the animated property, don't use draw_artist, don't use blit) but just set the image data and call canvas.draw() I did a quick read through of the code and did not find anything glaringly wrong, so you need to start simplifying the problem and reducing it to hone in on where the problem is occurring. If you post a free standing script that we can run , with the data, in all likelihood we can find the problem. You might even find it yourself in the process of developing a minimal script <wink> JDH ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users