You are using a heatmap as the background for a geographic map (which I think you are asking about) using basemap and imshow .
from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import numpy as np m = Basemap(width=12000000,height=9000000,projection='lcc', resolution='c',lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.) m.drawcoastlines(linewidth=0.25) data = 100*np.random.rand(10,10) m.imshow(data, interpolation = 'none') plt.show()

Molly source share