python - 如何使用 mplleaflet 绘制热图?
问题描述
我收到错误:get_offset_position 函数在 Matplotlib 3.3 中已被弃用,并将在两个次要版本中删除。
offset_order = offset_dict[collection.get_offset_position()
plog_fig_interp,ax = plt.subplots(figsize=(12,9))
ax.scatter(df['Lon'],df['Lat'],c=df['co2'],cmap='jet')
mplleaflet.show(fig=plog_fig_interp)
数据如下所示:
Lat Lon co2
Date
2019-07-19 08:00:00 48.161853 11.543937 726.305667
2019-07-19 08:00:03 48.161870 11.543932 733.974500
2019-07-19 08:00:06 48.161862 11.543938 727.221000
2019-07-19 08:00:09 48.161862 11.543938 704.938500
2019-07-19 08:00:12 48.161862 11.543938 690.199667
... ... ... ...
2019-07-19 17:29:45 48.148785 11.572585 550.429667
2019-07-19 17:29:48 48.148768 11.572583 545.866667
2019-07-19 17:29:51 48.148768 11.572583 544.453000
2019-07-19 17:29:54 48.148767 11.572572 544.697000
2019-07-19 17:29:57 48.148773 11.572568 547.018000
[11400 rows x 3 columns]
解决方案
推荐阅读
- javascript - 在 () -> fn 上传递对 onClick 的引用是否对性能有真正的影响?在反应
- matplotlib - 使用 matplotlib,有没有办法创建基本不等式的简单二维图
- python - 使用电子邮件收集功能制作基于 python 的网站,但在输入电子邮件时崩溃
- firebase - 如何将 firebase CLI 调试文件(即 ui-debug.log、firebase-debug.log)输出文件夹更改为单独的日志文件夹?
- powershell - “InputObject”如何为空?
- java - 是否有用于侦听音频命令的 Kotlin 或 Java 库?(想要在孩子们大喊“TRICK OR TREAT”时触发万圣节展示)
- sql - 使用 SQL 从匹配的 meta_key 中检索所有帖子
- json - 预期解码 Int 但找到了一个数组
- javascript - 在数据列表中创建间距
- javascript - 打字稿意外令牌