December 2017
Intermediate to advanced
386 pages
10h 42m
English
Enter the following in a Jupyter code cell and run it:
import cartopy.crs as ccrsfig = plt.figure(figsize=(10,10))ax = fig.add_subplot(1, 1, 1, projection=ccrs.Mollweide())ax.coastlines()ax.stock_img()rj_lat, rj_lon = -22.91, -43.18bj_lat, bj_lon = 39.90, 116.41plt.plot([rj_lon, bj_lon], [rj_lat, bj_lat], color='brown', lw=2, marker='o', ms=10, transform=ccrs.Geodetic())plt.text(rj_lon, rj_lat-8, 'Rio de Janeiro', fontsize=14, transform=ccrs.Geodetic())plt.text(bj_lon-7, bj_lat-9, 'Beijing', fontsize=14, horizontalalignment='right', transform=ccrs.Geodetic())None
When this code is executed, we get the following output:
>Read now
Unlock full access