Here is the explanation for the code:
- ax1.set_extent([-130, -66.5, 25, 47], ccrs.Geodetic()) specifies the extent of the area to be plotted as follows:
- (-130, -66.5) are the minimum and maximum longitude coordinates for the USA
- (25, 47) are the minimum and maximum latitude coordinates for the USA
- ccrs.Geodetic() specifies that the data coordinate format used is longitude and latitude, measured in degrees
- ax1.add_feature(cfeature.STATES, facecolor='wheat') plots the internal borders of the states of the USA. Cartopy provides this as a feature, similar to other physical features such as land, oceans, rivers, and lakes that we learned earlier. For other countries, we will have to get the data from shapefiles and plot it separately. ...