diff options
| author | J08nY | 2018-03-28 14:30:08 +0200 |
|---|---|---|
| committer | J08nY | 2018-03-28 14:30:08 +0200 |
| commit | e2b6a298522e6206903dcd0a0455431fb647d5d4 (patch) | |
| tree | 09ed2b071b88de58f73e3d4288f43c8eabd01bfe /util/plot_gen.py | |
| parent | 054f9f61f59a7b20ba835abb98d57a9746cafa86 (diff) | |
| download | ECTester-e2b6a298522e6206903dcd0a0455431fb647d5d4.tar.gz ECTester-e2b6a298522e6206903dcd0a0455431fb647d5d4.tar.zst ECTester-e2b6a298522e6206903dcd0a0455431fb647d5d4.zip | |
Diffstat (limited to 'util/plot_gen.py')
| -rwxr-xr-x | util/plot_gen.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/util/plot_gen.py b/util/plot_gen.py index f24fd2c..c37d7c2 100755 --- a/util/plot_gen.py +++ b/util/plot_gen.py @@ -27,6 +27,7 @@ if __name__ == "__main__": parser.add_argument("--hist", dest="hist", action="store_true", help="Show histogram.") parser.add_argument("--hw-hist", dest="hw_hist", action="store_true", help="Show Hamming weight 2D histogram (private key Hamming weight and generation time).") parser.add_argument("--skip-first", dest="skip_first", action="store_true", help="Skip first entry, as it's usually a large outlier.") + parser.add_argument("-t", "--title", dest="title", type=str, nargs="?", default="", help="What title to give the figure.") parser.add_argument("file", type=str, help="The file to plot(csv).") opts = parser.parse_args() @@ -58,8 +59,14 @@ if __name__ == "__main__": plt.style.use("ggplot") fig = plt.figure() - fig.tight_layout(rect=[0, 0.02, 1, 0.98]) - fig.suptitle(opts.file) + layout_kwargs = {} + if opts.title is None: + fig.suptitle(opts.file) + layout_kwargs["rect"] = [0, 0.02, 1, 0.98] + elif opts.title: + fig.suptitle(opts.title) + layout_kwargs["rect"] = [0, 0.02, 1, 0.98] + fig.tight_layout(**layout_kwargs) plot_i = 1 if plots[0]: |
