In this recipe, we will plot locations inhabited by human beings across the globe. We will use the corresponding shapefile from the Natural Earth data website.
Plotting populated places of the world
Getting ready
You'll need to import the required libraries using the following commands:
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import cartopy.io.shapereader as shpreader
How to do it...
The following are the steps involved in plotting our map:
- Define the figure and axes with a PlateCarree projection:
plt.figure(figsize=(12, 6))
ax = plt.axes(projection...