生成current_year这一年各城市人口基本情况;
def draw_barchart(current_year):
# dff对year==current_year的行,以value从升序方式排序...)
dx = dff['value'].max() / 200
# ax.text(x,y,name,font,va,ha)
# x,y表示位置;
# name表示显示文本...color='#777777', ha='right', bbox=dict(facecolor='white', alpha=0.8, edgecolor='white'))
# 取消图表周围的方框显示...))
with plt.xkcd():
fig, ax = plt.subplots(figsize=(15, 8))
draw_barchart(2019)
#将原来的静态图拼接成动画...=range(2000, 2019))
#保存到jshtml
HTML(animator.to_jshtml())
#生成video,并保存至指定文件夹中
import os
ffmpegpath