python - 像素化地图matplot到“平滑地图”?
问题描述
渲染带有netcdf
信息的地图我有下面的图像,但它是像素化的,是否有一种形式可以像第二张图像一样渲染“平滑地图”?
#Variables netcdf file
lons = ds.variables['longitude'][:]
lats = ds.variables['latitude'][:]
time = ds.variables['time'][:]
data = ds.variables['tc_ch4'][:]
#map Basemap
mp = Basemap(projection = 'merc',
llcrnrlon = -95.030665,
llcrnrlat = 5.2,
urcrnrlon = -72.960931,
urcrnrlat = 18.961754,
resolution = 'i')
lon, lat = np.meshgrid(lons, lats)
x, y = mp(lon, lat)
cscheme = mp.pcolor(x, y, np.squeeze(data[1,:,:]), cmap = 'YlOrRd')
cbar = mp.colorbar(cscheme, location = 'right')
mp.drawcoastlines(linewidth=0.3)
mp.drawstates(linewidth=0.1)
mp.drawcountries(linewidth=0.1)
fecha = t[i].strftime('%Y-%m')
plt.title('Columna Total de Metano - kg m**-2')
plt.xlabel('Año-Mes 2003-01')
plt.show()
使用上面的代码生成的图像
使用Panoply生成的图像
解决方案
推荐阅读
- javascript - 如何在角度 9 的 @syncfusion 时间表中调用具有选定日期的函数?
- javascript - 每个(var A in B)错误的javascript,B是一个数组数组
- ssis - SSIS - 控制打印到输出窗口的内容
- awk - 用'~'替换字符串
- json - Prime React Datatable 嵌套 JSON
- javascript - javascript中的动态JSON解析
- javascript - 如何使用 nodejs 或 javascript 从 mongodb 获取递归类别
- c# - 使用 JQuery 在视图中部分渲染
- geode - apache geode 磁盘存储不会在集群重启时重新填充
- javascript - 在 express 应用程序中使用 https 本机模块