There is a multitude of libraries based on Matplotlib dedicated to the creation of specialized graphs. In this recipe, we will discuss cartopy, which is a Python package for creating maps and handling the display of geographical information.
Creating a map with cartopy
Getting ready
The first step is to install cartopy on your system. Since cartopy assumes a large number of dependencies, this recipe assumes that you have the Anaconda distribution installed. This being the case, simply run the following statement from the command line to install cartopy:
conda install -c conda-forge cartopy
After the installation finishes, start Jupyter and run the following three commands in an execution cell:
%matplotlib inline
import numpy...