Matplotlib底图动画 [英] Matplotlib Basemap animation

查看:95
本文介绍了Matplotlib底图动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用底图在地图上绘制一些点,并且我想向其添加任何种类的动画.只要它是动画,它就真的没用,只要是动画就可以了.

I'm using basemap to plot some points on a map, and I want to add any kind of animation to it. It could literally serve no purpose at all, as long as it is an animation it would be nice.

这是我目前制作地图的条件,

This is what I currently have to make the map,

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
map = Basemap(projection='robin', resolution = 'l', area_thresh = 1000.0,
          lat_0=0, lon_0=-130)
map.drawcoastlines()
map.drawcountries()
map.fillcontinents(color = 'gray')
map.drawmapboundary()
map.drawmeridians(np.arange(0, 360, 30))
map.drawparallels(np.arange(-90, 90, 30))

x,y = map(lons, lats)
map.plot(x, y, 'ro', markersize=4)


plt.show()

推荐答案

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆