From 8457fd16029393c35d89c21d5d7ef1adc625ded1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 1 May 2023 15:17:10 -0400 Subject: Fix benchmark plot script --- scripts/plot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/plot.py b/scripts/plot.py index bb4d752..f0eb1a2 100755 --- a/scripts/plot.py +++ b/scripts/plot.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright 2011-2022 David Robillard +# Copyright 2011-2023 David Robillard # SPDX-License-Identifier: ISC """ @@ -82,7 +82,7 @@ if __name__ == "__main__": pyplot.xlabel("Elements") pyplot.ylabel("Time (s)") - times = [[]] * len(columns) + times = [[] for i in range(len(columns))] for line in in_file: if line[0] == "#": continue @@ -109,6 +109,6 @@ if __name__ == "__main__": file_prefix_len = len(file_prefix) pyplot.title(os.path.splitext(filename[file_prefix_len:])[0].title()) - print(f"Writing {sys.argv[1]}") - matplotlib.pyplot.tight_layout() - matplotlib.pyplot.savefig(sys.argv[1]) + print("Writing %s" % sys.argv[1]) + matplotlib.pyplot.tight_layout() + matplotlib.pyplot.savefig(sys.argv[1]) -- cgit v1.2.1