小编bub*_*ble的帖子

Cartopy:使用散点图数据渲染图层的顺序

我试图使用Cartopy在地图上绘制几个点(散点图)的位置(参见下面的代码).当我尝试渲染绘图时,数据点将在LAND层后面呈现.但我想在LAND-layer上绘制我的分散数据......我做错了什么?

Cartopy:ver.0.12.x,Matplotlib:ver.1.4.2

import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.feature as cfeature 

ax = plt.axes(projection=ccrs.PlateCarree()) 
ax.set_extent([125, 150, 35, 63])         

ax.stock_img()

ax.add_feature(cfeature.LAND) #If I comment this => all ok, but I need 
ax.add_feature(cfeature.LAKES)
ax.add_feature(cfeature.RIVERS)
ax.coastlines()

ax.scatter(yc,xc,transform=ccrs.PlateCarree()) #yc, xc -- lists or numpy arrays

plt.show()
Run Code Online (Sandbox Code Playgroud)

LAND图层下显示的点

没有LAND层的情节

python matplotlib cartopy

6
推荐指数
1
解决办法
3028
查看次数

标签 统计

cartopy ×1

matplotlib ×1

python ×1