Standalone map with map

I am trying to find if it is possible to set a background set (like a 2D map) for a heat map? Read the data from the file and print a heat map (which is pretty simple). But in offline mode, do we have a heat map superimposed on a real map?

Any helpful suggestion appreciated.

+1
source share
1 answer

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() 

map with heatmap

+1
source

Source: https://habr.com/ru/post/987226/


All Articles