October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following are the steps to plot an animated map and save it as an MP4 file:
import matplotlibmatplotlib.use('tkagg')
fig = plt.figure(figsize=(6, 6))
def animate(longitude): ax = plt.gca() ax.remove() ax = plt.axes([0, 0, 1, 1], projection=ccrs.Geostationary(central_longitude=longitude)) ax.set_global() ax.coastlines() ax.stock_img() ax.gridlines()
ani = animation.FuncAnimation(fig, animate, frames=np.linspace(0, 360, 10), interval=50, repeat=True, repeat_delay=500)
Read now
Unlock full access