ts = pd.Series(np.random.randn(1000), index=pd.date_range("1/1/2000", periods=1000))
ts = ts.cumsum()
df = pd.DataFrame(np.random.randn(1000, 4), index=ts.index, columns=list("ABCD"))
df = df.cumsum()
df.plot(figsize=(10, 6), title='早起Python', grid=True, xlabel='时间', ylabel='数量')
plt.show()
df.plot(figsize=(10, 6), title='早起Python', grid=True, xlabel='时间', ylabel='数量',fontsize = 13)
plt.show()
df.plot(figsize=(10, 6), grid=True, fontsize = 13)
plt.title("早起Python",size = 17)
plt.xlabel('时间',size = 15)
plt.ylabel('数量',size =15)
plt.show()
df.plot(figsize=(10, 6), grid=True, fontsize = 13)
plt.title("早起Python",size = 17)
plt.xlabel('时间',size = 15)
plt.ylabel('数量',size =15)
plt.legend(loc=3)
plt.show()
ax = df.plot(secondary_y=['A', 'B'], figsize=(10, 6), fontsize = 13)
ax.set_ylabel('CD')
ax.right_ax.set_ylabel('AB')
ax.legend(loc=2)
plt.title("早起Python",size = 17)
plt.xlabel('时间',size = 15)
plt.ylabel('数量',size =15)
plt.legend(loc=1)
plt.show()