Mauro Cavalcanti wrote: > Dear Jeff, > > 2008/12/9 Jeff Whitaker <[EMAIL PROTECTED]>: > >> Mauro: The shape of x, y, and dat must all be (nlats, nlons). >> > > I tried to do: > > coords = numpy.loadtxt('grid.dat') > lon = coords[:,0] > lat = coords[:,1] > dat = coords[:,2] > X, Y = numpy.meshgrid(lon, lat) > nlons = X.shape[1] > nlats = X.shape[0] > Z = dat.reshape(nlats,nlons) > > (so that I could proceed to plotting with the X,Y,Z arrays), but got > another error: > > "ValueError: total size of new array must be unchanged" > > and with this I get lost.... :( > > I tried to follow the guidelines you provided for Mr. Tim Michelsen on > a previous post > (http://www.nabble.com/plotting-a-contour-map-from-CSV-file-td18440459.html) > but it didn't help (however, that provided me with a solution to > another problem!). > > Best regards, > > Mauro: This will only work is dat is length(nlons*nlats). Is it?
-Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users