consider the following script that gives grids of matplotlib axes with a cartopy projection
proj = ccrs.LambertAzimuthalEqualArea(central_latitude = clat, central_longitude = clon)
fig,axes = plt.subplots(1,3, figsize=(10,10),subplot_kw={'projection':proj})
changing the figsize parameter is not affecting the actual fig size when a cartopy projection is applied. In addition, even though the given width and heights of the fig are equal, the result figure doesn’t show that.
Edit: here is the complete code. Plotting parameters can be obtained from this link plotting parameters
import json
from matplotlib import pyplot as plt
import cartopy.crs as ccrs
with open('plot_params.json', 'r') as f:
plot_params = json.load(f)
#
glon_e3d = plot_params['glon_e3d']
gclat_e3d = plot_params['gclat_e3d']
glon_test = plot_params['glon_test']
gclat_test = plot_params['gclat_test']
lon_secs = plot_params['lon_secs']
lat_secs = plot_params['lat_secs']
#
proj = ccrs.LambertAzimuthalEqualArea(central_latitude = clat, central_longitude = clon)
fig,axes = plt.subplots(1,3, figsize=(10,10),subplot_kw={'projection':proj})
axs = axes.ravel()
#
extent = [205, 225, 63, 69]
ax = axs[0]
ax.gridlines()
ax.set_extent(extent, crs=ccrs.PlateCarree())
ax.scatter(glon_e3d, gclat_e3d, transform = ccrs.Geodetic(), c = 'r', marker = '.', label = 'data points', s=10)
#
ax = axs[1]
ax.gridlines()
ax.set_extent(extent, crs=ccrs.PlateCarree())
ax.scatter(glon_test, gclat_test, transform = ccrs.Geodetic(), c = 'r', marker = '.', label = 'data points', s=10)
#
ax = axs[2]
ax.gridlines()
ax.set_extent(extent, crs=ccrs.PlateCarree())
ax.scatter(lon_secs, lat_secs, transform = ccrs.Geodetic(), c = 'r', marker = '.', label = 'data points', s=10)
plt.show()
2