Re: [Matplotlib-users] basemap and contouring

2010-09-13 Thread Ryan May
On Mon, Sep 13, 2010 at 9:23 AM, Jeff Whitaker wrote: > Martin: > > You need a meshgrid > > x,y  = np.meshgrid(x,y) > > just *before* (not after) > > px,py = m(x,y) > > so that x and y have the same shape as data2. Yeah, my bad. That's what I get for responding *before* coffee this morning. Ryan

Re: [Matplotlib-users] basemap and contouring

2010-09-13 Thread Benjamin Root
On Mon, Sep 13, 2010 at 9:02 AM, mdekauwe 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, >

Re: [Matplotlib-users] basemap and contouring

2010-09-13 Thread mdekauwe
Hi Jeff, many thanks that was exactly the problem! Martin Jeff Whitaker wrote: > > On 9/13/10 8:02 AM, mdekauwe 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, llcrnrlo

Re: [Matplotlib-users] basemap and contouring

2010-09-13 Thread Jeff Whitaker
On 9/13/10 8:02 AM, mdekauwe 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, > res

Re: [Matplotlib-users] basemap and contouring

2010-09-13 Thread mdekauwe
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 'D

Re: [Matplotlib-users] basemap and contouring

2010-09-13 Thread Benjamin Root
On Mon, Sep 13, 2010 at 8:21 AM, mdekauwe wrote: > > Hi, > > Well hopefully doing what you suggested correctly... > > 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=

Re: [Matplotlib-users] basemap and contouring

2010-09-13 Thread mdekauwe
Hi, Well hopefully doing what you suggested correctly... 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, resolu

Re: [Matplotlib-users] basemap and contouring

2010-09-13 Thread Ryan May
On Mon, Sep 13, 2010 at 7:45 AM, mdekauwe wrote: > > Hi, > > If I set up a random example and plot it as a contour it seems to work > fine...e.g. > > import matplotlb.pyplot as plt > import numpy as np > > data2 = np.random.sample((17,16)) > x = np.linspace(-1.74, -1.32, 16) > y = np.linspace(15.1

[Matplotlib-users] basemap and contouring

2010-09-13 Thread mdekauwe
Hi, If I set up a random example and plot it as a contour it seems to work fine...e.g. import matplotlb.pyplot as plt import numpy as np data2 = np.random.sample((17,16)) x = np.linspace(-1.74, -1.32, 16) y = np.linspace(15.15, 15.61, 17) X, Y = np.meshgrid(x, y) plt.contour(X, Y, data2,