I am drawing the map above using cartopy and the foll. code:
gl = ax.gridlines(crs=ccrs.PlateCarree(), draw_labels=True, alpha=0.35)
gl.xlabels_top = False
gl.ylabels_left = False
gl.xlocator = mticker.FixedLocator([-120, -60, 0, 60, 120])
gl.xformatter = LONGITUDE_FORMATTER
gl.yformatter = LATITUDE_FORMATTER
How do I restrict this to only draw gridlines for -23.5 N, 0 and 23.5 degree N latitude?
gl.ylocator = mticker.FixedLocator([-23.5, 23.5])
- Maciej A. Czyzewskigl.gca().yaxis.set_major_locator(gl.NullLocator())
- Maciej A. CzyzewskiAttributeError: 'GeoAxesSubplot' object has no attribute 'gca'
- user308827gca()
returns the current axes, try simply without. - Maciej A. Czyzewski