Search code examples
pythoncartopy

Drawing lines of constant latitude with cartopy on North Polar Stereo projection


I'd like to draw two lines at 88 and 84 degrees north on a cartopy north polar stereo map, but am stumped as to how to do it.

I've tried with:

gl = ax.gridlines(draw_labels=False, xlocs=[], ylocs=[88,84])
gl.n_steps = 90

and also:

gl = ax.gridlines(crs=ccrs.PlateCarree(), draw_labels=True,
                  linewidth=2, color='gray', alpha=0.5, linestyle='--')

and receive:

"Cannot label gridlines on a NorthPolarStereo plot. Only PlateCarree and Mercator plots are currently supported."

but it seems like ax.gridlines just isn't set up for north polar stereo.

Can anybody help?


Solution

  • This should be available in the next release (0.18). You can test it out if you build/install CartoPy from git master.