【发布时间】:2021-07-29 01:56:29
【问题描述】:
fig_1 = plt.figure(1, figsize=(6.4, 4.8))
chart_1 = fig_1.add_subplot(121)
chart_2 = fig_1.add_subplot(122)
chart_1.plot(year, apl_price)
chart_2.plot(year, ms_price)
plt.show()
【问题讨论】:
-
chart_1.set_xlabel(...),chart_1.set_ylabel(...)... 也可能更容易做到fig_1, (chart_1, chart_2) = plt.subplots(ncols=2, figsize=(6.4, 4.8))。
标签: python matplotlib