How to draw North-America-focused map using matplotlib basemap

Note that matplotlib basemap is deprecated in favour of cartopy ! Also see:

This code allows you to draw an map that is focused on North America using matplotlib basemap:

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
my_map = Basemap(projection='ortho', lat_0=45 ,lon_0=-100, resolution='l')
my_map.drawcoastlines(linewidth=1)
my_map.drawcountries(linewidth=0.5)

# Make plot larger
plt.gcf().set_size_inches(20, 10)
# Save to file
plt.savefig("North America.svg")