From 7583924e82527abe5092af61515b31dcaaf86354 Mon Sep 17 00:00:00 2001 From: Theophile GENTILHOMME Date: Thu, 21 Jun 2018 09:31:57 +0200 Subject: [PATCH] [script][figure] Change behavior when legends are given for system Use same legend for dev and eval hist when the number of legends is equal to the number of systems. It is still possible to change the legends of individual histograms by passing 2 * #system legends. --- bob/measure/script/figure.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bob/measure/script/figure.py b/bob/measure/script/figure.py index 5347e05..ec9d24e 100644 --- a/bob/measure/script/figure.py +++ b/bob/measure/script/figure.py @@ -584,6 +584,10 @@ class Hist(PlotBase): self._y_label = 'Probability density' self._x_label = 'Scores values' self._end_setup_plot = False + if self._legends is not None and len(self._legends) == self.n_systems \ + and not self._hide_dev: + self._legends = [x for pair in zip(self._legends,self._legends) + for x in pair] def compute(self, idx, input_scores, input_names): ''' Draw histograms of negative and positive scores.''' -- 2.21.0