ax2.yaxis.set_major_formatter(cticker.LatitudeFormatter()) #将经纬度数据点存入同一数组 points = np.array([lon, lat]).T.reshape(-1, 1, 2) segments = np.concatenate([points[:-1], points[1:]], axis=1) #设置色标的标准化范围(即将Z维度的数据对应为颜色数组) norm = plt.Normalize(0, ...
数据集读取方法(def函数): importosimportpandasaspdimportnumpyasnpfrompathlibimportPathfromtypingimportListfromtypingimportUnionfromtypingimportTuplefrommatplotlib.collectionsimportLineCollectionimportmatplotlib.pyplotaspltimportcartopy.crsasccrsimportcartopy.featureascfeature#读取CMA热带气旋最佳路径数据集defreader(typhoon...
50,10),crs=ccrs.PlateCarree())ax1.xaxis.set_major_formatter(cticker.LongitudeFormatter())ax1.yaxis.set_major_formatter(cticker.LatitudeFormatter())#将绘制台风路径,并将逐六小时坐标点及其对应的台风强度标记