Skip to content

Commit 2f59d2b

Browse files
committed
fix broken examples
1 parent 3e6eccb commit 2f59d2b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

test/set_bitmap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
grb['missingValue']=9999.
1313
grb['bitmapPresent']=1
1414
nx = grb['Ni']; ny = grb['Nj']
15-
data[3*ny/8:5*ny/8,3*nx/8:5*nx/8]=grb['missingValue']
15+
data[3*ny//8:5*ny//8,3*nx//8:5*nx//8]=grb['missingValue']
1616
grb['values']=data
1717
msg = grb.tostring()
1818
grbs.close()

test/test_reglatlon.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
plt.title('%s Global Lat/Lon Grid' % grb.name)
1616
fig = plt.figure()
1717
m.drawcoastlines()
18-
m.contourf(lons,lats,data2,15,cmap=plt.cm.spectral)
18+
m.contourf(lons,lats,data2,15)
1919
plt.title('%s Global Lat/Lon Grid' % grb2.name)
2020

2121
lat1=15; lat2=65; lon1=220; lon2=320

test/test_tigge.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
(grb['centre'], fld.shape, fld.min(), fld.max()))
1212
fig=plt.figure(figsize=(10,5))
1313
fig.add_axes([0.1,0.1,0.8,0.8])
14-
# setup robinson world map projection.
15-
m = Basemap(projection='robin',lon_0=180)
14+
m = Basemap(projection='cyl',lon_0=180)
1615
x, y = m(lons,lats)
1716
levels = np.arange(475,1101,25)
1817
CS = m.contourf(x,y,fld,levels,cmap=plt.cm.jet)

0 commit comments

Comments
 (0)