- 积分
- 2415
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-11-25
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2014-2-20 09:41:44
|
显示全部楼层
阿阿飞飞 发表于 2014-2-19 18:24
同时要对你读取出来的经纬度进行分割,在x,y=m.makegrid(nx,ny)语句后面添加:
index=np.logical_and(np.l ...
我把这几行输入进去后,发现出错了,也不知道怎么回事:
Traceback (most recent call last):
File "C:/Users/Administrator/Desktop/程序/3.py", line 20, in <module>
cs=plt.contourf(lons,lats,a)
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 2650, in contourf
ret = ax.contourf(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 7981, in contourf
return mcontour.QuadContourSet(self, *args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\contour.py", line 1414, in __init__
ContourSet.__init__(self, ax, *args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\contour.py", line 860, in __init__
self._process_args(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\contour.py", line 1427, in _process_args
x, y, z = self._contour_args(args, kwargs)
File "C:\Python27\lib\site-packages\matplotlib\contour.py", line 1491, in _contour_args
x, y, z = self._check_xyz(args[:3], kwargs)
File "C:\Python27\lib\site-packages\matplotlib\contour.py", line 1525, in _check_xyz
raise TypeError("Input z must be a 2D array.")
TypeError: Input z must be a 2D array.
|
|