#随机plot的的线条颜色
def randomcolor(): #随机颜色16进制 colorArr = ['1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'] color = "" for i in range(6): color += colorArr[random.randint(0,14)] return "#"+color plt.plot(x, y, ls="-", lw=1, color=randomcolor(), label=os.path.split(n)[1])