From a169ba41fc39b2e6c4202c6b1ee83ddb59a105e2 Mon Sep 17 00:00:00 2001
From: Theophile GENTILHOMME <tgentilhomme@jurasix08.idiap.ch>
Date: Thu, 26 Apr 2018 08:52:38 +0200
Subject: [PATCH] Update bin option and code accordingly

---
 bob/pad/base/script/figure.py      | 10 +++++-----
 bob/pad/base/test/test_commands.py |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/bob/pad/base/script/figure.py b/bob/pad/base/script/figure.py
index d9d7798..78400a8 100644
--- a/bob/pad/base/script/figure.py
+++ b/bob/pad/base/script/figure.py
@@ -96,10 +96,10 @@ class HistPad(measure_figure.Hist):
     def _setup_hist(self, neg, pos):
         self._title_base = 'PAD'
         self._density_hist(
-            pos[0], label='Bona Fide', color='C1'
+            pos[0], n=0, label='Bona Fide', color='C1'
         )
         self._density_hist(
-            neg[0], label='Presentation attack', alpha=0.4, color='C7',
+            neg[0], n=1, label='Presentation attack', alpha=0.4, color='C7',
             hatch='\\\\'
         )
 
@@ -147,13 +147,13 @@ class HistVuln(measure_figure.Hist):
     def _setup_hist(self, neg, pos):
         self._title_base = 'Vulnerability'
         self._density_hist(
-            pos[0], label='Genuine', color='C1'
+            pos[0], n=0, label='Genuine', color='C1'
         )
         self._density_hist(
-            neg[0], label='Zero-effort impostors', alpha=0.8, color='C0'
+            neg[0], n=1, label='Zero-effort impostors', alpha=0.8, color='C0'
         )
         self._density_hist(
-            neg[1], label='Presentation attack', alpha=0.4, color='C7',
+            neg[1], n=2, label='Presentation attack', alpha=0.4, color='C7',
             hatch='\\\\'
         )
 
diff --git a/bob/pad/base/test/test_commands.py b/bob/pad/base/test/test_commands.py
index 7d819a5..aa03d6a 100644
--- a/bob/pad/base/test/test_commands.py
+++ b/bob/pad/base/test/test_commands.py
@@ -64,13 +64,13 @@ def test_hist():
     with runner.isolated_filesystem():
         result = runner.invoke(histograms.hist, ['--criterion', 'hter', '--output',
                                                  'HISTO.pdf', '-b',
-                                                 30, '--no-evaluation',
+                                                 '30,auto', '--no-evaluation',
                                                  licit_dev, spoof_dev])
         assert result.exit_code == 0, (result.exit_code, result.output)
 
     with runner.isolated_filesystem():
         result = runner.invoke(histograms.hist, ['--criterion', 'eer', '--output',
-                                                 'HISTO.pdf', '-b', 30,
+                                                 'HISTO.pdf', '-b', '30',
                                                  licit_dev, licit_test,
                                                  spoof_dev, spoof_test])
         assert result.exit_code == 0, (result.exit_code, result.output)
@@ -87,7 +87,7 @@ def test_vuln():
     runner = CliRunner()
     with runner.isolated_filesystem():
         result = runner.invoke(histograms.vuln, ['--criterion', 'eer', '--output',
-                                                 'HISTO.pdf', '-b', 30,
+                                                 'HISTO.pdf', '-b', '30',
                                                  licit_dev, licit_test,
                                                  spoof_dev, spoof_test])
         assert result.exit_code == 0, (result.exit_code, result.output)
-- 
GitLab