summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-01 15:17:10 -0400
committerDavid Robillard <d@drobilla.net>2023-05-01 15:21:59 -0400
commit8457fd16029393c35d89c21d5d7ef1adc625ded1 (patch)
treeeb187328be009143195139786de76c9a62525eb2
parent093d2fd80dfa0bb921eb7531e2d1246a17e7b0b1 (diff)
downloadzix-8457fd16029393c35d89c21d5d7ef1adc625ded1.tar.gz
zix-8457fd16029393c35d89c21d5d7ef1adc625ded1.tar.bz2
zix-8457fd16029393c35d89c21d5d7ef1adc625ded1.zip
Fix benchmark plot script
-rwxr-xr-xscripts/plot.py10
1 files changed, 5 insertions, 5 deletions
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 <d@drobilla.net>
+# Copyright 2011-2023 David Robillard <d@drobilla.net>
# 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])