热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

离线热图与地图背景-Offlineheatmapwithmapbackground

Iamtryingtofindifwecanhavebackgroundset(as2Dmap)foraheatmap?Readdatafromafile

I am trying to find if we can have background set (as 2D map) for a heat map ? Read data from a file and plot heat map (which is pretty simple) But in offline mode can we have the heat map imposed on the real map ?

我试图找到我们是否可以为热图设置背景(作为2D地图)?从文件中读取数据并绘制热图(这很简单)但是在离线模式下我们可以将热图强加到真实地图上吗?

Any useful suggestion appreciated.

任何有用的建议表示赞赏。

1 个解决方案

#1


You use a heat map as the background for a geographical map (which I think is what you are asking about) using basemap and imshow.

您可以使用热图作为地图的背景(我认为这就是您要问的内容),使用底图和imshow。

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np

m = Basemap(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


推荐阅读
author-avatar
大华出入境
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有