如何在matplotlib中用一条线连接绘制的点

时间:2016-07-13 10:50:10

标签: python matplotlib matplotlib-basemap

我有我的模型的网格单元角坐标,我想现在可视化我的模型网格,通过连接角来获得矩形网格。

在我的脚本中,我定义了以下命令在给定点之间绘制一条线(数据来自netcdf文件)。我可以垂直连接交叉点。但我想水平绘制虚线(比如水平连接红点)。到目前为止我的脚本如下:

xqu,yqu = map(qulon,qulat)  #-- u vectors lat/lon
xqv,yqv = map(qvlon,qvlat)  #-- v vectors lat/lon

#--plot zonal vector point (u) and connect to eachother (vertical cell walls)
vectsu= map.plot(xqu,yqu, '-', color='Indigo',linewidth=1,markerfacecolor='b', markersize=10)

#--plot meridional vector point (vsi) and connect to eachother (horizontal cell walls)
vectsv= map.plot(xqv,yqv, '-',  color='g',linewidth=1,markerfacecolor='b', markersize=10)

see the resulted image here

如何水平连接这些点?

0 个答案:

没有答案