我正在使用Python中的Folium创建一个贴图,然后在该贴图中添加一个光栅,其中像素从-1到+1不等。我也使用彩色地图,但我的地图显示得很暗。然而,我可以看到传说。以下是我使用的代码:
colormap = cm.LinearColormap(colors=['red','lightblue'], vmin=-1,vmax=1)
map= folium.Map(location=[47.57157950, -2.82316415],
tiles = 'Stamen Terrain', zoom_start=13)
map.add_child(folium.raster_layers.ImageOverlay(dataimage,
bounds=[[47.47813608, -2.98340958], [47.66479599, -2.66234847]]))
map.add_child(colormap)
#Save html
import webbrowser
map.save('mapme.html')
webbrowser.open("mapme.html")
为此,我得到以下输出
目前没有回答
相关问题 更多 >
编程相关推荐