Thank u for your help. I did it as your reply. But some questions appear
again . Can you give me some more advice , your help will be appreciated.
Code are as following:  You know when I do "self.ax.images.append(self.im)"
in pylab . It do properly , But ,it fail here.  Thank you!



# -*- coding:gb2312 -*- 
import matplotlib
matplotlib.use("WXAgg")
matplotlib.interactive(True)
from matplotlib.backends.backend_wx import FigureCanvasWx
from matplotlib.figure import Figure
from matplotlib.axes import *
from numpy import *
import wx
from matplotlib.image import NonUniformImage
import numpy as npy
    
#---------------------------------------------------

class DynamicPlot():
    def __init__(self,Frame):
        x = npy.arange(-4, 4, 0.005)
        y = npy.arange(-4, 4, 0.005)
        z = npy.sqrt(x[npy.newaxis,:]**2 + y[:,npy.newaxis]**2)

        
        self.fig = Figure((8,8), 75)
        self.canvas = FigureCanvasWx(Frame, -1, self.fig)
        self.ax=self.fig.add_subplot(111)
        self.im = NonUniformImage(self.ax)
        self.im.set_data(x, y, z)
        self.ax.images.append(self.im)
        self.ax.imshow(self.im)
app = wx.PySimpleApp()
f=wx.Frame(None,size=(600,600))
f.Show(True)
DynamicPlot(f)
app.MainLoop()
-- 
View this message in context: 
http://www.nabble.com/matplotlib.image.AxesImage-can%27t-work.-tf4897267.html#a14057748
Sent from the matplotlib - devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to