Reputation: 1224
I would like to obtain a map of the United States so I can plot coordinates or destination lines on it. I cannot seem to find how to plot a map of the US. Is there anyway I can do this in Python?
Upvotes: 3
Views: 3616
Reputation: 80
You can use pyplot's basemap module for things like that:
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
m = Basemap(llcrnrlon=-145.5,llcrnrlat=1.,urcrnrlon=-2.566,urcrnrlat=46.352,\
rsphere=(6378137.00,6356752.3142),\
resolution='l',area_thresh=1000.,projection='lcc',\
lat_1=50.,lon_0=-107.,ax=ax)
plt.show()
For more examples have a look at the basemap docu.
Upvotes: 1