diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-02-11 15:28:10 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-02-11 15:28:10 +0100 |
| commit | 569b2b78baed903539895bd022ffe9d2e1576373 (patch) | |
| tree | ba389f8eaa82bea536e94e6be285bc751be7a6b8 /src | |
| parent | e27ec8f7d77d155dbc77718bfb40dce7b1ae6859 (diff) | |
| download | allocbench-569b2b78baed903539895bd022ffe9d2e1576373.tar.gz allocbench-569b2b78baed903539895bd022ffe9d2e1576373.zip | |
add summarize option to specify a custom latex preamble
this is meant for some latex setup specifics like including common.tex
Diffstat (limited to 'src')
| -rw-r--r-- | src/globalvars.py | 2 | ||||
| -rw-r--r-- | src/plots.py | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/globalvars.py b/src/globalvars.py index bcb722b..474c124 100644 --- a/src/globalvars.py +++ b/src/globalvars.py @@ -62,3 +62,5 @@ benchmarks = [e[:-3] for e in os.listdir(os.path.join(allocbenchdir, benchsrcdir if e[-3:] == ".py" and e != "__init__.py"] summary_file_ext = "svg" + +latex_custom_preamble = "" diff --git a/src/plots.py b/src/plots.py index 1be0d31..d7fb0ea 100644 --- a/src/plots.py +++ b/src/plots.py @@ -469,6 +469,9 @@ def pgfplot_legend(bench, sumdir=""): rgb = matplotlib.colors.to_rgb(alloc_dict["color"]) tex += f"\\providecolor{{{alloc_name}-color}}{{rgb}}{{{rgb[0]},{rgb[1]},{rgb[2]}}}\n" + if src.globalvars.latex_custom_preamble: + tex += src.globalvars.latex_custom_preamble + "\n" + tex +=\ """ \\begin{document} @@ -517,6 +520,9 @@ def pgfplot_linear(bench, perms, xval, yval, ylabel="'y-label'", xlabel="'x-labe rgb = matplotlib.colors.to_rgb(alloc_dict["color"]) tex += f"\\providecolor{{{alloc_name}-color}}{{rgb}}{{{rgb[0]},{rgb[1]},{rgb[2]}}}\n" + if src.globalvars.latex_custom_preamble: + tex += src.globalvars.latex_custom_preamble + "\n" + tex +=\ f""" \\begin{{document}} |
