实例
看注释over
import matplotlib.pyplot as plt
import numpy as np
x1 =[0 ,0.0009 ,0.0019, 0.004, 0.0045, 0.005, 0.0055, 0.006, 0.007, 0.0075, 0.008, 0.010,]
y1= [0.8,0.9257, 0.9259, 0.9253,0.93, 0.9258, 0.9258, 0.9259,0.9269,0.9258, 0.9258, 0.926]
x2=[0, 0.0005,0.001,0.0015,0.0018,0.002,0.0025,0.003 ,0.004, 0.005, 0.006, 0.01]
y2=[0.7293,0.7938,0.800,0.801, 0.803, 0.805,0.8531,0.8391,0.8456,0.8369,0.8466,0.8477]
x3=[0, 0.0003,0.001,0.0015,0.0018,0.002,0.0025,0.003 ,0.004, 0.005, 0.006, 0.01]
y3=[0.72, 0.71 ,0.73 ,0.803, 0.804, 0.81,0.8603,0.8608,0.8666,0.868,0.8735,0.8656]
x4=[0, 0.0003,0.001,0.0015,0.0018,0.002,0.0025,0.003 ,0.004, 0.005, 0.006, 0.01]
y4=[0.18, 0.40 ,0.70 ,0.70, 0.73, 0.75,0.76,0.78,0.80,0.813,0.815,0.82]
x5=[0, 0.0003,0.001,0.0015,0.0018,0.002,0.0025,0.003 ,0.004, 0.005, 0.006, 0.01]
y5=[0.30, 0.41 ,0.67 ,0.68, 0.74, 0.745,0.75,0.756,0.757,0.756,0.777,0.789]
x6=[0, 0.002, 0.0023,0.0029,0.0035,0.004,0.0042,0.006 ,0.0065, 0.008, 0.009, 0.01]
y6=[0.0, 0.001 ,0.24 ,0.37, 0.38, 0.39, 0.4, 0.39, 0.42, 0.423, 0.435,0.44]
plt.plot(x1, y1, label='l1', color='yellow',linewidth=1)
plt.plot(x2, y2, label='l2',color='green',linewidth=1)
plt.plot(x3, y3, label='l3',color='pink',linewidth=1,linestyle="--")
plt.plot(x4, y4, label='l4',color='lime',linewidth=1,linestyle="--")
plt.plot(x5, y5, label='l5',color='hotpink',linewidth=1)
plt.plot(x6, y6, label='l6',color='blue',linewidth=1,linestyle="--")
plt.legend()
plt.title('a1')
plt.xlabel("FRP")
plt.ylabel("Recall")
plt.show()
代码运行成品图
|