绘图-子图

list_1= [0, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 109]
list_2 = ['5:00', '6:30', '8:10', '9:50', '11:30', '13:10', '14:50', '16:30', '18:10', '19:50', '21:30', '23:10']

fig = plt.figure(figsize=(20, 10)) 
ax1 = fig.add_subplot(2, 1, 1)
ax1.plot(df_week_1['sum_value'].values[684:798])
ax1.set_ylim(0, 3000)
plt.xticks(list_1, list_2, rotation=45)

ax2 = fig.add_subplot(2, 1, 2)
ax2.plot(df_week_2['sum_value'].values[684:798])
ax2.set_ylim(0, 3000)
plt.xticks(list_1, list_2, rotation=45)

你可能感兴趣的:(绘图-子图)