问题描述
我想在地图上绘制热量数据(cartopy投影),但是在地图的边缘,无论阵列的大小如何,都会创建一个细胞框架。注意,最左边和最右边的列具有相同的值。
代码:
import cartopy.crs as ccrs
import matplotlib.pyplot as @R_502_6411@
import numpy as np
ax = @R_502[email protected](projection=ccrs.PlateCarree())
ax.set_global()
ax.coastlines()
heat_data = np.random.rand(10,10)
lat = np.linspace(-90,90,heat_data.shape[1])
lon = np.linspace(-180,180,heat_data.shape[0])
ax.pcolormesh(lon,lat,np.transpose(heat_data),alpha = 0.2)
@R_502[email protected]()
结果1:Result without transparency of the array (first and last columns have identical values)
结果2:Result with transparent array