have you reied the mat file ?
i treid using a simple python array in a 2d plot and i'm having the same behavioure
the x,y coordinates are displayed ok when the mouse roll over the graph
but they are wrong in the axis labels.
Il giorno 05/feb/2011, alle ore 09.23, Massimo Di Stefano ha scritto:
The mat file is :
Il giorno 04/feb/2011, alle ore 19.41, Benjamin Root ha scritto:
On Friday, February 4, 2011, Massimo Di Stefano >> <massimodisasha@...287...> wrote:
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
matdata = sio.loadmat(matfile)
data = loadmatfile(matfile)
x = data['X_depth']
y = data['Y_depth']
z = -data['Z_depth']
c = data['Z_compl']
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)
matfile = '/Users/epy/Desktop/complexity_depth_grid1.mat'
the results is nice :
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!
I suspect what is happening is that the axes label numbers are right,
but is not showing the offset information. The display of offset data
in a 3d plot is a new feature that exists only in the development
To confirm this, could you send me your may file (if it is small) so
that I can try out your script?