if "times" in experiment_dir:
// If it"s a time plot.
unit = "Time"
experiment_dir = experiment_dir.replace("times", "")
disc_ext = "Discounted " if track_disc_reward else ""
// Set names.
After Change
for i, agent_name in enumerate(agents):
// Add figure for this algorithm.
agent_color_index = i if agent_name not in agent_colors else agent_colors[agent_name]
series_color = colors[agent_color_index]
series_marker = markers[agent_color_index]
y_axis = results[i]