From eea9955c7bc91c5f095d9d901d45064249fbee28 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 2 Apr 2023 13:48:13 -0400 Subject: Fix redefined names in plot.py --- scripts/plot.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/plot.py b/scripts/plot.py index dbf79de..bb4d752 100755 --- a/scripts/plot.py +++ b/scripts/plot.py @@ -82,10 +82,7 @@ if __name__ == "__main__": pyplot.xlabel("Elements") pyplot.ylabel("Time (s)") - times = [] - for i in columns: - times.append([]) - + times = [[]] * len(columns) for line in in_file: if line[0] == "#": continue @@ -94,9 +91,9 @@ if __name__ == "__main__": for index, field in enumerate(fields): times[index].append([float(field)]) - for i in range(len(times) - 1): + for t in range(len(times) - 1): matplotlib.pyplot.plot( - times[0], times[i + 1], "-o", label=columns[i + 1] + times[0], times[t + 1], "-o", label=columns[t + 1] ) pyplot.legend( -- cgit v1.2.1