From: John Hunter <jdhunter@ac...>  20050225 17:52:25

>>>>> "Andrea" == Andrea Riciputi <ariciputi@...> writes: Andrea> Hi all, I'm an absolutely matplotlib newbie, so I'm sorry Andrea> if my question is trivial. Anyway I've read the user guide Andrea> and looked at the examples without finding out a solution. Andrea> Here it is my problem. Suppose I have a 2dimensional Andrea> array containg my data, and I want to produce a surface or Andrea> a contour plot with it. Now the imshow() function seems Andrea> the right way to go through. So far so good. Now suppose I Andrea> want to draw the x,y axes for this plot, and suppose my Andrea> axes are represented by **notuniform** 1dimensional Andrea> array x[i], y[j]. How can I get the right ticks on the Andrea> plot axes?? You need to interpolate your data onto a rectilinear grid and then use pcolor. imshow requires that your data be an image  eg the dx and dy between rows and columns is the same between every row and column. pcolor only assumes a rectilinear grid, so the dx and dy can vary from row to row and column to column. But you have unstructured data. In matlab, the interpolation is handled by the griddata function. Peter Groszkowski promised to post some code he uses to for this purpose back in December, but apparently he got lost in the stars. matlab uses a delaunay triangulation according to the documentation for griddata  I think Peter uses a different approach. I looked at the scipy interpolate module but didn't see anything that looked just right  perhaps I missed it. It surprises that scipy doesn't have a delaunay triangulation routine, but apparently it does not. A quick google for revealed http://www.python.org/pypi?:action=display&name=Delny&version=0.1.0a2 which relies on the gnu qhull library... A griddata function for mpl would be a nice complement to the meshgrid function. JDH 