def main(args):
""" Main entry.
"""
report_lines = load_report(args.report)
v_results = parse_report(report_lines)
font = {'family': 'normal',
# 'weight': 'bold',
'size': 16}
matplotlib.rc('font', **font)
for i, indexer in zip(range(len(args.indexers)), args.indexers):
fig = plt.figure(i)
ax = fig.add_subplot(1, 1, 1)
ax.hold(True)
print v_results
for index, nbits, results in v_results:
if nbits not in [128, 64, 32, 16, 8]:
continue
if index != indexer:
continue
X = [r[0] for r in results]
Y = [r[1] for r in results]
print np.vstack((X, Y))
ax.plot(X, Y, label="%d-bit" % (nbits))
plt.xlabel("$R$")
plt.ylabel("$recall$")
ax.hold(False)
ax.set_xscale("log")
# pl.legend(loc='lower right')
plt.legend(loc='upper left')
plt.savefig(args.figdir + "/%s.png" % indexer)
plt.savefig(args.figdir + "/%s.eps" % indexer)
plt.show()
评论列表
文章目录