).T.reshape(-1, 1, 2)
segments = np.concatenate([points[:-1], points[1:]], axis=1)
#设置色标的标准化范围(即将Z维度的数据对应为颜色数组...).T.reshape(-1, 1, 2)
segments = np.concatenate([points[:-1], points[1:]], axis=1)
#设置色标的标准化范围(即将Z维度的数据对应为颜色数组...绘制台风图标
ax2.plot(lon_i, lat_i, marker=tcmarkers.TS, markersize=3, color=color)
优化2.0
对线段显示进行调整,并增加图例...ccrs.PlateCarree())
lc.set_linewidth(0.5)
lc.set_array(level[:-1])
line = ax2.add_collection(lc)
# 创建图例...legend_elements.append(Line2D([0], [0], marker=tcmarkers.TS,color=color, markersize=5))
# 添加图例到图表中