width = 200
height = 300
lllon, lllat, urlon, urlat = -144.99499512, -59.95500183, -65.03500366, 60.00500107
dlon = (urlon-lllon)/width
dLat = (urlat-lllat)/height
baseArray = np.fromfunction(lambda y,x: (1000.0/(width + height)) * (y+x), (height, width), dtype = float)
lons = np.arange(lllon, urlon, dlon)
lats = np.arange(lllat, urlat, dLat)
lons, lats = np.meshgrid(lons, lats)
fig = plt.figure()
plt.title("The Plot")
m = Basemap(projection='cyl',
resolution = 'c',
llcrnrlon = lllon, llcrnrlat = lllat,
urcrnrlon =urlon, urcrnrlat = urlat
)
m.pcolormesh(lons, lats, baseArray, shading='flat', latlon=True)
plt.show()
출처
2014-05-03 08:19:47
osx
그것이 내가하는 방법입니다. 컬러 메쉬를 생성하는 것은 빠르지 만 표시가 너무 느립니다. – osx