(1)越来越流行 plotly
(2)替换matplotlib
df = px.data.gapminder() df_2007 = df.query("year==2007") fig = px.scatter(df_2007, x="gdpPercap", y="lifeExp", color="continent", size="pop", size_max=50, hover_name="country", animation_frame="year", animation_group="country", log_x="True", labels=dict(pop="Population", dgpPercap="GDP per Capital", lifeExp="Life Expection"), range_x=[100, 100000], range_y=[25,90]) HTML(fig.to_html())
结果:
标签:df,工具包,画图,pop,2007,plotly,year,size From: https://www.cnblogs.com/demo-deng/p/16712574.html