From 7bbcc34871b93b32c482c0d72ec1bb8b20307f65 Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Fri, 21 Jul 2017 11:55:07 +0200
Subject: [PATCH] Use an environment variable to avoid style changes not
 required by the user

---
 bob/bio/base/script/evaluate.py | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/bob/bio/base/script/evaluate.py b/bob/bio/base/script/evaluate.py
index 3da78d5c..e7cc2e87 100644
--- a/bob/bio/base/script/evaluate.py
+++ b/bob/bio/base/script/evaluate.py
@@ -1,24 +1,31 @@
 #!/usr/bin/env python
 # vim: set fileencoding=utf-8 :
-# Manuel Guenther <manuel.guenther@idiap.ch>
-# Tue Jul 2 14:52:49 CEST 2013
-
-from __future__ import print_function
 
 """This script evaluates the given score files and computes EER, HTER.
-It also is able to plot CMC and ROC curves."""
+It also is able to plot CMC and ROC curves.
+You can set the environment variable BOB_NO_STYLE_CHANGES to any value to avoid
+this script from changing the matplotlib style values. """
 
+from __future__ import print_function
 import bob.measure
 
 import argparse
-import numpy, math
+import numpy
+import math
 import os
 
 # matplotlib stuff
-import matplotlib; matplotlib.use('pdf') #avoids TkInter threaded start
+import matplotlib
+matplotlib.use('pdf')  # avoids TkInter threaded start
 from matplotlib import pyplot
 from matplotlib.backends.backend_pdf import PdfPages
 
+if not os.environ.get('BOB_NO_STYLE_CHANGES'):
+  # increase the default line width and font size
+  matplotlib.rc('lines', linewidth=4)
+  matplotlib.rc('font', size=18)
+
+
 import bob.core
 logger = bob.core.log.setup("bob.bio.base")
 
-- 
GitLab