Carlos Grohmann wrote:
I've been searching but coudn't find any example on how to add a
progress bar to a wxpython+matplotlib app.
I'd like my app to show a progress bar while some gridding and
contouring are being done.

this is the code I'm using (without preogress bar)

    funcs = {"Natural Neighbor":'nn',
Multiquadric":'inverse multiquadric',"Gaussian":'gaussian',"Linear

# check what kind of interpolation are we using
    if interp == 'Natural Neighbor' or interp == 'Triangulation': #
Delaunay-based (mlab)
        xi = yi = np.linspace(-1.1,1.1,ngrid)
        zi = griddata(node_x,node_y,z,xi,yi,interp=funcs[interp])
    else: # Radial basis functions (scipy)
        ti = np.linspace(-1.1,1.1,ngrid)
        xi, yi = np.meshgrid(ti, ti)
        rbf = Rbf(node_x, node_y, z,
        zi = rbf(xi, yi)

        ## we only want the points that lie inside the circle,
        ## so we have to create a polygon to select the interpolated values
        polyXY = []
        u = np.arange(0,361,1)
        t = np.radians(u)
        x = np.cos(t)
        y = np.sin(t)
        verts = np.array(polyXY)
        verts = verts[0]
        xyflat = zip(xi.flat,yi.flat)
        pmask = points_inside_poly(xyflat, verts)
        pmask2 = np.reshape(pmask,(ngrid,ngrid))
        zmask = ma.masked_where(pmask2==False,zi)
        zi = zmask



Hello Carlos,

Is the wx ProgressDialog class not suitable for your application?

-- jv