#285 Use a background layer

Instead of colouring your map with uniform colors, you can use layer for your background. Here are a few examples showing the layers that are available using python and basemap.

  • #285 Load a background

    
    from mpl_toolkits.basemap import Basemap
    import matplotlib.pyplot as plt
    
    m = Basemap(llcrnrlon=-10.5,llcrnrlat=33,urcrnrlon=10.,urcrnrlat=46., resolution='i', projection='cass', lat_0 = 39.5, lon_0 = 0.)
    m.bluemarble()
    plt.show()
    
    
  • #285 Load a background

    
    from mpl_toolkits.basemap import Basemap
    import matplotlib.pyplot as plt
    
    m = Basemap(llcrnrlon=-10.5,llcrnrlat=33,urcrnrlon=10.,urcrnrlat=46., resolution='i', projection='cass', lat_0 = 39.5, lon_0 = 0.)
    m.shadedrelief()
    plt.show()
    
    
  • #285 Load a background

    
    m = Basemap(llcrnrlon=-10.5,llcrnrlat=33,urcrnrlon=10.,urcrnrlat=46., resolution='i', projection='cass', lat_0 = 39.5, lon_0 = 0.)
    m.etopo()
    
    
  • See help(m.arcgisimage) for more possibilities.

    
    # World Shaded Relief
    m = Basemap(projection='mill',llcrnrlon=-123. ,llcrnrlat=37,urcrnrlon=-121 ,urcrnrlat=39, resolution = 'l', epsg = 4326)
    m.arcgisimage(service='World_Shaded_Relief', xpixels = 1500, verbose= True)
    
    # Ocean Basemap
    m = Basemap(projection='mill',llcrnrlon=-123. ,llcrnrlat=37,urcrnrlon=-121 ,urcrnrlat=39, resolution = 'l', epsg = 4326)
    m.arcgisimage(service='Ocean_Basemap', xpixels = 1500, verbose= True)
    
    

Leave a Reply

Your email address will not be published.