- 积分
- 4877
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-11-28
- 最后登录
- 1970-1-1
|
发表于 2017-1-13 11:31:05
|
显示全部楼层
感谢楼主这么详细的解答,根据您的代码我修改了下我的,之后在画等值线图的时候还是有些问题,不知是不是我插值插错了哪里?
代码如下- stfn = 'D:/jieyang/stations.csv'
- table = readtable(stfn, delimiter=',', format='%s%4f')
- lon = table['Lon']
- lat = table['Lat']
- T = table['Temp']
- x = arange(115.5, 116.7, 0.11)
- y = arange(22.8, 23.9, 0.11)
- gtemp,gx,gy = griddata((lon, lat), T, xi=(x, y), method='idw', pointnum= 4)
- axesm()
- bou2_layer = shaperead('D:/jieyang/JieyangLine.shp')
- bou1_layer = shaperead('D:/jieyang/JieyangPoly.shp')
- geoshow(bou2_layer)
- geoshow(bou1_layer)
- layer = contourfm(x, y, T, 20)
- colorbar(layer)
复制代码 |
|