Here is the explanation for the preceding code:
- import cartopy.crs as ccrs imports the package responsible for setting up the reference coordinate system.
- import cartopy.feature as cfeature imports the package used for plotting various features, such as land, oceans, rivers, and lakes.
- ax = fig.add_subplot(1, 1, 1, projection=ccrs.PlateCarree()) defines the axes on which the map is to be plotted, as follows:
- (1,1,1) specifies that it is the first axes in a 1 x 1 grid, which essentially means that it is the only plot in the overall figure.
- projection=ccrs.PlateCarree() specifies the coordinate reference system to be used for plotting the map. Many such projections (reference coordinate systems) are provided by cartopy. We ...