转自:https://www.cnblogs.com/alimin1987/p/8047833.html import matplotlib.pyplot as pltimport numpy as npimport pandas as pdx= np.arange(1,20,1)plt.plot(x,x**2,label='Fast')#label为标签plt.plot(x,x*2,label='Mormal')#lplt.legend(loc=0,ncol=2)#图例及位置: 1右上角,2
https://blog.csdn.net/Poul_henry/article/details/82533569 import matplotlib.pyplot as plt import numpy as np x = np.arange(10) print x fig = plt.figure() ax = plt.subplot(111) for i in xrange(5): #ax.plot(x, i * x, label='y=%dx' %i) ax.plot(x, i * x,