Search code examples
pythongeopandasmatplotlib-basemapcartopy

Earth map generator alternative to Basemap


Since Basemap is deprecated, is there any other alternative such cartopy, geopandas, etc.. that can generate this beautiful maps (and not just the contour-type) that I got with Basemap with different projections? (hopefully that works offline too) enter image description here

enter image description here


Solution

  • Does cartopy’s ax.stock_image() do the trick? It looks ver similar to what you’re shooting for.

    For example, to plot a globe using a geostationary projection:

    import cartopy.crs as ccrs
    import matplotlib.pyplot as plt
    
    ax = plt.axes(projection=ccrs.Geostationary())
    ax.stock_img()
    plt.show()
    

    enter image description here Check out the guide to projections to get more projection options: https://scitools.org.uk/cartopy/docs/v0.15/crs/projections.html#cartopy-projections