Contourf using 'projection=ccrs.SouthPolarStereo()'

46 Views Asked by At

I'm going to draw a map focusing on the Antarctic, the code as follows:

ax = fig.add_subplot(gs[0],projection=ccrs.SouthPolarStereo())
ax.set_extent([-180, 180, -90, -40], ccrs.PlateCarree())
ax.contourf(lon,lat,ncp,levels=np.linspace(0,60,51),\
            extend='max',cmap = cmaps.WhiteBlueGreenYellowRed,\
            transform=ccrs.PlateCarree(),transform_first=True)
...

theta = np.linspace(0, 2*np.pi, 100)
center, radius = [0.5, 0.5], 0.5
verts = np.vstack([np.sin(theta), np.cos(theta)]).T
circle = mpath.Path(verts * radius + center)
ax.set_boundary(circle, transform=ax.transAxes)

It gives the figure on the left, which is weird. How can I get the right one? enter image description here

Also, how can I fill the iceshelf places as gray too?

0

There are 0 best solutions below