Hello All,
i'm plotting a 3d colored surface using a 4D array that comes from a .mat file using this code : import scipy.io as sio import pylab as p import mpl_toolkits.mplot3d.axes3d as p3 def loadmatfile(matfile): matdata = sio.loadmat(matfile) return matdata def plot3dcolor(matfile): data = loadmatfile(matfile) x = data['X_depth'] y = data['Y_depth'] z = -data['Z_depth'] c = data['Z_compl'] fig=p.figure() ax = p3.Axes3D(fig) cmap = p.get_cmap('jet') norm = p.Normalize(c.min(), c.max()) colors = cmap(norm(c)) ax.plot_surface(x, y, z, rstride=10, cstride=10, facecolors=colors) ax.set_xlabel('X') ax.set_ylabel('Y') ax.set_zlabel('Z') print x,y p.show() matfile = '/Users/epy/Desktop/complexity_depth_grid1.mat' plot3dcolor(matfile) the results is nice : http://img831.imageshack.us/f/schermata20110204a14542.png/ but as you can see, the mouse cursor shows me the x,y values (they are longitude and latitude) but on the axis i have them starting from 0 ... how can i change the axis to display the lon-lat coordinates ? thanks a lot for any help! Massimo. ------------------------------------------------------------------------------ The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users