for j in range(MAX_ROBOTS): samples[i].append([]) first = True print 'Reading from: ' + sys.argv[2] with open(sys.argv[2], 'rb') as csvfile: content_reader = csv.reader(csvfile, delimiter=',') for line in content_reader: for i in range(num_methods): for j in range(MAX_ROBOTS): samples[i][j].append(float(line[i + num_methods*j])) fig, ax, rects, means= \ graph.draw_3d_bar_chart(samples[2:], [' ' + str(0.1 * i) for i in range(0, 11, 2)], range(1,6), ylabel='maxRobots', xlabel=r'$\lambda$', zlabel='Distance Traveled') # fig, ax, rects, means= \ # graph.draw_line_graph(samples[2:], [r'$\lambda$=' + str(0.1 * i) for i in range(11)], # range(1,6), # xlabel='maxRobots', # ylabel='Normalized Distance') # sigs = None # if num_methods == 2: # sigs = [] # for robots in range(MAX_ROBOTS): # sig = graph.is_significant(samples[0][robots], samples[1][robots]) # if sig:
for j in range(MAX_ROBOTS): samples[i].append([]) first = True print 'Reading from: ' + sys.argv[2] with open(sys.argv[2], 'rb') as csvfile: content_reader = csv.reader(csvfile, delimiter=',') for line in content_reader: for i in range(num_methods): for j in range(MAX_ROBOTS): samples[i][j].append(float(line[i + num_methods*j])) fig, ax, rects, means= \ graph.draw_3d_bar_chart(samples[2:], [str(0.1 * i) for i in range(0, 11, 2)], range(1,6), ylabel='maxRobots', xlabel=r'$\lambda$', zlabel='Normalized Time Taken') ax.view_init(15,-120) # fig, ax, rects, means= \ # graph.draw_line_graph(samples[2:], [r'$\lambda$=' + str(0.1 * i) for i in range(11)], # range(1,6), # xlabel='maxRobots', # ylabel='Normalized Distance') # sigs = None # if num_methods == 2: # sigs = [] # for robots in range(MAX_ROBOTS): # sig = graph.is_significant(samples[0][robots], samples[1][robots])
print 'Reading reward from: ' + sys.argv[1] with open(sys.argv[1], 'rb') as csvfile: content_reader = csv.reader(csvfile, delimiter=',') for line in content_reader: for i in range(num_methods): for j in range(MAX_ROBOTS): samples[i][j].append(-float(line[i + num_methods*j])) top_level_names = ['10','20','30','40','50'] second_level_names = ['1','2','3','4','5'] third_level_names = ['0.0','-0.5','-1','-1.5','-2','-2.5', '-3', '-3.5', '-4'] fig, ax, rects, means= \ graph.draw_3d_bar_chart(samples, top_level_names=top_level_names, second_level_names=second_level_names, third_level_names=third_level_names, xlabel='visRange (meters)', ylabel='adjDepth', zlabel='Normalized Reward (negated)', flip_y=False) ax.view_init(15,-135) fig = plt.gcf() fig.set_size_inches(5,5) plt.savefig('out.png',bbox_inches='tight',pad_inches=0.0,dpi=300) plt.show() # pylab.figure() # for method in range(num_methods): # pylab.hist(samples[method][4], [1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 20.0, 50.0, 100.0], histtype='step', label=method_names[method])
for i in range(num_methods): samples.append([]) for j in range(MAX_ROBOTS): samples[i].append([]) first = True print "Reading from: " + sys.argv[2] with open(sys.argv[2], "rb") as csvfile: content_reader = csv.reader(csvfile, delimiter=",") for line in content_reader: for i in range(num_methods): for j in range(MAX_ROBOTS): samples[i][j].append(float(line[i + num_methods * j])) fig, ax, rects, means = graph.draw_3d_bar_chart( samples[2:], method_names[2:], range(1, 6), ylabel="maxRobots", zlabel="Normalized Time Taken", xtickrotation=45 ) ax.view_init(15, -60) # fig, ax, rects, means= \ # graph.draw_line_graph(samples[2:], [r'$\lambda$=' + str(0.1 * i) for i in range(11)], # range(1,6), # xlabel='maxRobots', # ylabel='Normalized Distance') # sigs = None # if num_methods == 2: # sigs = [] # for robots in range(MAX_ROBOTS): # sig = graph.is_significant(samples[0][robots], samples[1][robots])