我想使用 pandas 数据框(称为 df)在图上创建多个子图。
我原来的情节在这里:
df.plot(x='month', y='number', title='open by month',color="blue")
我在本网站的“使用图形和子图”部分尝试了多次来自 matplotlib 的 pyplot 教程 http://matplotlib.org/users/pyplot_tutorial.html
[ 1 ]
plt.figure(1)
df.plot.(figure(1), sublot(211), x='month', y='number', title='open byXXX"
df.plot.(figure(1), sublot(212), x='month', y='number', title='open byXXX"
[ 2 ]
plt.figure(1)
df.plot.subplot(211)(x='month', y='number', title='open byXXX")
df.plot.subplot(212)(x='month', y='number', title='open byXXX")