- 积分
- 3477
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-4-27
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 redersun 于 2022-3-8 22:34 编辑
比如quiverm函数,其帮助文档如下:
quiverm(*args, **kwargs)
Plot a 2-D field of arrows in a map.
:param x: (*array_like*) Optional. X coordinate array.
:param y: (*array_like*) Optional. Y coordinate array.
:param u: (*array_like*) U component of the arrow vectors (wind field) or wind direction.
:param v: (*array_like*) V component of the arrow vectors (wind field) or wind speed.
:param z: (*array_like*) Optional, 2-D z value array.
:param levs: (*array_like*) Optional. A list of floating point numbers indicating the level
vectors to draw, in increasing order.
:param cmap: (*string*) Color map string.
:param fill_value: (*float*) Fill_value. Default is ``-9999.0``.
:param isuv: (*boolean*) Is U/V or direction/speed data array pairs. Default is True.
:param size: (*float*) Base size of the arrows.
:param proj: (*ProjectionInfo*) Map projection of the data. Default is None.
:param zorder: (*int*) Z-order of created layer for display.
:param select: (*boolean*) Set the return layer as selected layer or not.
:returns: (*VectoryLayer*) Created quiver VectoryLayer.
其调用示例如下:
f = addfile('D:/Temp/GrADS/model.ctl')u = f['U'][0,'500','10:60','60:140']
v = f['V'][0,'500','10:60','60:140']
speed = sqrt(u*u+v*v)#Plot
axesm()
lworld = shaperead('D:/Temp/Map/country1.shp')
geoshow(lworld)
layer = quiverm(u, v, speed, 10, size=8)
quiverkey(layer, 0.74, 0.18, 15, bbox={'edge':True, 'fill':True})
colorbar(layer)
title('Wind field')
yticks([20,40,60])
上面调用quiverm函数的示例中,size=8是关键字参数,那么它前面的参数都应该是位置参数了,那么实参u,v,speed,10对应的形参分别是哪个?为什么?
|
|