线样式
-: 直线
--: 虚线
-.: 点横线
:: 全点线
子图
在 matplotlib 中,整个图像为 Figure ,而一个 Figure 中可以有多个 axes。...('bmh')
fig = plt.figure(figsize=(10, 6), facecolor='gray')
# 创建图表,在2行2列的第一个位置
ax1 = fig.add_subplot...(50).cumsum(), alpha=0.5, color='b')
ax4 = fig.add_subplot(2, 2, 2)
df2 = pd.DataFrame(np.random.rand...list('ABC'))
# 单系列柱状图
s.plot(kind='bar', ax=axes[0], grid=True,legend=True,label='s',alpha=0.6)
# 多系列柱状图...df.plot(kind='bar',ax=axes[1],colormap='Reds_r')
# 多系列堆叠图
df.plot(kind='bar',ax=axes[2], colormap='