matplotlib画图无法显示图例 报错No handles with labels found to put in legend.

很久没有matplotlib了,今天画图的时候发现了一个很小的问题。。。。明明加了legend(),图表会出来,却无法正常显示图例。最后发现只要在plt.plot()加label图例就可以正常显示了。

 

posted @ 2019-04-01 16:33  阿瑶不会秃  阅读(11515)  评论(0编辑  收藏  举报