On Mon, Sep 13, 2010 at 9:02 AM, mdekauwe <mdeka...@gmail.com> wrote:
> > Hi, > > Well I tried... > > numrows = 17 > numcols = 16 > ulat, llat, ulon, llon = 15.61, 15.15, -1.32, -1.74 > m = Basemap(projection='geos', lon_0=0.0, llcrnrlon=llon, > llcrnrlat=llat, urcrnrlon=ulon, urcrnrlat=ulat, > resolution='c') > > data2 = np.random.sample((17,16)) > print 'DATA2 shape:', data2.shape > x = np.linspace(-1.74, -1.32, 16) > y = np.linspace(15.15, 15.61, 17) > print 'x shape:', x.shape > print 'y shape:', y.shape > px, py = m(x, y) > > > which gives... > > DATA2 shape: (17, 16) > x shape: (16,) > y shape: (17,) > > So that looks OK. Turns out the error now comes at the line px, py = m(x, > y). So perhaps I am doing the basemap step incorrectly? > > Traceback (most recent call last): > File "./recontour_plot.py", line 83, in <module> > px, py = m(x, y) > File > "/users/eow/mgdk/sun4u//lib/python/mpl_toolkits/basemap/__init__.py", > line 823, in __call__ > return self.projtran(x,y,inverse=inverse) > File "/users/eow/mgdk/sun4u//lib/python/mpl_toolkits/basemap/proj.py", > line 241, in __call__ > outx,outy = self._proj4(x, y, inverse=inverse) > File "/users/eow/mgdk/sun4u//lib/python/mpl_toolkits/basemap/pyproj.py", > line 193, in __call__ > _Proj._fwd(self, inx, iny, radians=radians, errcheck=errcheck) > File "_proj.pyx", line 56, in _proj.Proj._fwd (src/_proj.c:725) > RuntimeError: Buffer lengths not the same > > Martin, It would be more useful to see what are the shapes of px, py, X, and Y. Ben Root
------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users