diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-02-11 15:31:26 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-02-11 15:31:26 +0100 |
| commit | 910bd14c7c1feeeac75eda8198dd963c8eee1c90 (patch) | |
| tree | 5971af00deb6d58c7aa74796818ef2d4d4751340 | |
| parent | b4abe62aee1262051697702752a19b52ecfaca41 (diff) | |
| download | allocbench-910bd14c7c1feeeac75eda8198dd963c8eee1c90.tar.gz allocbench-910bd14c7c1feeeac75eda8198dd963c8eee1c90.zip | |
add legend file name to pgfplot_legend arguments
| -rw-r--r-- | src/plots.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plots.py b/src/plots.py index 1542c49..12ffefd 100644 --- a/src/plots.py +++ b/src/plots.py @@ -456,7 +456,7 @@ def write_tex_table(bench, entries, filepostfix="", sumdir=""): print("\\end{tabular}", file=tex_file) print("\\end{document}", file=tex_file) -def pgfplot_legend(bench, sumdir=""): +def pgfplot_legend(bench, sumdir="", file_name="pgfplot_legend"): """create a standalone pgfplot legend""" allocators = bench.results["allocators"] @@ -509,7 +509,7 @@ def pgfplot_legend(bench, sumdir=""): \\end{tikzpicture} \\end{document}""" - with open(os.path.join(sumdir, "legend.tex"), "w") as legend_file: + with open(os.path.join(sumdir, f"{file_name}.tex"), "w") as legend_file: print(tex, file=legend_file) def pgfplot_linear(bench, perms, xval, yval, ylabel="'y-label'", xlabel="'x-label'", |
