From c7f75528a58d1cb0a7241b6e9b5e5fa7558e39c3 Mon Sep 17 00:00:00 2001 From: Theophile GENTILHOMME <tgentilhomme@jurasix08.idiap.ch> Date: Tue, 24 Apr 2018 12:07:32 +0200 Subject: [PATCH] Add title and label options --- bob/pad/base/script/det.py | 1 + bob/pad/base/script/epc.py | 3 +++ bob/pad/base/script/figure.py | 7 ++++--- bob/pad/base/script/fmr_iapmr.py | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bob/pad/base/script/det.py b/bob/pad/base/script/det.py index 35e626f..3738bc0 100644 --- a/bob/pad/base/script/det.py +++ b/bob/pad/base/script/det.py @@ -10,6 +10,7 @@ from . import figure @common_options.scores_argument(min_arg=2, force_eval=True, nargs=-1) @common_options.output_plot_file_option(default_out='det.pdf') @common_options.titles_option() +@common_options.title_option() @common_options.const_layout_option() @common_options.style_option() @common_options.figsize_option() diff --git a/bob/pad/base/script/epc.py b/bob/pad/base/script/epc.py index 10b89f1..8b574bd 100644 --- a/bob/pad/base/script/epc.py +++ b/bob/pad/base/script/epc.py @@ -10,7 +10,10 @@ from . import figure @common_options.scores_argument(min_arg=2, force_eval=True, nargs=-1) @common_options.output_plot_file_option(default_out='epc.pdf') @common_options.titles_option() +@common_options.title_option() @common_options.const_layout_option() +@common_options.x_label_option() +@common_options.y_label_option() @common_options.figsize_option() @common_options.style_option() @common_options.bool_option( diff --git a/bob/pad/base/script/figure.py b/bob/pad/base/script/figure.py index b3c5216..62870ac 100644 --- a/bob/pad/base/script/figure.py +++ b/bob/pad/base/script/figure.py @@ -213,9 +213,10 @@ class Epc(PadPlot): super(Epc, self).__init__(ctx, scores, evaluation, func_load) self._iapmr = True if 'iapmr' not in self._ctx.meta else \ self._ctx.meta['iapmr'] - self._title = 'EPC and IAPMR' if self._iapmr else 'EPC' - self._x_label = r"Weight $\beta$" - self._y_label = "WER (%)" + self._title = self._title or ('EPC and IAPMR' if self._iapmr else + 'EPC') + self._x_label = self._x_label or r"Weight $\beta$" + self._y_label = self._y_label or "WER (%)" self._eval = True #always eval data with EPC self._split = False self._nb_figs = 1 diff --git a/bob/pad/base/script/fmr_iapmr.py b/bob/pad/base/script/fmr_iapmr.py index 38f8078..b876ab4 100644 --- a/bob/pad/base/script/fmr_iapmr.py +++ b/bob/pad/base/script/fmr_iapmr.py @@ -10,6 +10,7 @@ from . import figure @common_options.scores_argument(min_arg=2, force_eval=True, nargs=-1) @common_options.output_plot_file_option(default_out='fmr_iapmr.pdf') @common_options.titles_option() +@common_options.title_option() @common_options.const_layout_option() @common_options.style_option() @common_options.figsize_option() -- GitLab