用Matplotlib给子图添加图例时出错ax.legend() TypeError zip argument #2 must support iteration
画图时添加图例importmatplotlib.pyplotaspltline_up,=plt.plot([1,2,3])plt.legend(line_up,'Up')plt.show()报错zipargument#2mustsupportiteration应该是legend的参数需要zip形式。(forlabel,handleinzip(labels,handles)所有改写成下面形式就好了i