【发布时间】:2017-04-10 19:17:16
【问题描述】:
fig = plt.figure()
ax1 = fig.add_subplot(111)
ax1.plot(hpi_data, label = hpi_data.columns.values) #<-- how to add values to each plot?
ax1.plot(benchmark, linewidth=3, label='Benchmark')
plt.legend(loc=2, ncol=2, prop={'size':12}).get_frame().set_alpha(0.1)
plt.show()
请看传说,它看起来有点乱。有谁知道如何将每个标签相应地分配给每个情节?
【问题讨论】:
标签: python matplotlib legend subplot