代码拉取完成,页面将自动刷新
import numpy as np
import matplotlib.pyplot as plt
exp = []
# For each experiment folder
for e in xrange(0,3):
tmp = np.loadtxt("EXP"+str(e+1)+"/SI_Proj/RESULTS/mandril/PLOT/elapsed_time.txt")
exp.append(tmp)
count = list(xrange(1,11))
# Plot
pl_exp1, = plt.plot(count, exp[0], linestyle='-', marker='v', color='red', label='Ants initialized on random positions')
pl_exp2, = plt.plot(count, exp[1], linestyle='-', marker='s', color='green', label='Ants initialized on most promising solutions')
pl_exp3, = plt.plot(count, exp[2], linestyle='-', marker='o', color='blue', label='Improved search based on ants average pheromone deposit')
plt.legend((pl_exp1, pl_exp2, pl_exp3),
( 'Ants initialized on random positions',
'Ants initialized on most promising solutions',
'Improved search based on ants average pheromone deposit'),
loc=2,
prop={'size':10},
fancybox=True)
plt.grid(True)
plt.xlabel("Iteration Count")
plt.ylabel("Time elapsed for iteration (in milli seconds)")
plt.savefig('elapsed_time.pdf')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。