相关文章推荐
怕老婆的跑步机  ·  three.js ...·  11 月前    · 
英俊的针织衫  ·  java - SpringData ...·  2 年前    · 
import matplotlib.pyplot as plt plt . rcParams [ 'font.sans-serif' ] = [ 'Songti SC' ] plt . rcParams [ 'axes.unicode_minus' ] = False
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()