[SciPy-user] How to draw a 3D graphic of a function?

Have you noticed any problems with tic-label
placement on the "y" axis?

Cheers,
Alan Isaac

···

On Sun, 13 Apr 2008, "James A. Bednar" apparently wrote:

def matrixplot3d(mat,title=None):
    fig = pylab.figure()
    ax = axes3d.Axes3D(fig)

    # Construct matrices for r and c values
    rn,cn = mat.shape
    c = outer(ones(rn),arange(cn*1.0))
    r = outer(arange(rn*1.0),ones(cn))

    ax.plot_wireframe(r,c,mat)

    ax.set_xlabel('R')
    ax.set_ylabel('C')
    ax.set_zlabel('Value')

    if title: windowtitle(title)
    pylab.show()