趋势(二)利用python绘制面积图
面积图( Area Chart)简介
面积图是折线图的一种,通过颜色或纹理填充线下面的区域,可以更好的突出趋势信息。...as np
import matplotlib.pyplot as plt
# 自定义数据
x=range(1,15)
y=[1,4,6,8,4,5,3,2,4,1,5,6,8,7]
# 修改颜色...、透明度
plt.fill_between( x, y, color="skyblue", alpha=0.2)
# 绘制一条高亮的线
plt.plot(x, y, color="Slateblue"...np.random.rand(160)
})
# 利用sns创建网格
g = sns.FacetGrid(df, col='country', hue='country', col_wrap=4, )
# 绘制折线图...共勉~
参考资料
[1]
matplotlib.pyplot.plot: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html