From 32922124920e3e231e7ca89cf100bcf224f4a689 Mon Sep 17 00:00:00 2001 From: Theophile GENTILHOMME <tgentilhomme@jurasix08.idiap.ch> Date: Thu, 5 Apr 2018 11:11:21 +0200 Subject: [PATCH] Fix incorrect plotting behavior when multiple sytems used --- bob/measure/script/figure.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bob/measure/script/figure.py b/bob/measure/script/figure.py index 8d82519..888dc0b 100644 --- a/bob/measure/script/figure.py +++ b/bob/measure/script/figure.py @@ -394,6 +394,9 @@ class PlotBase(MeasureBase): mpl.ylabel(self._y_label) mpl.grid(True, color=self._grid_color) mpl.legend() + axis = [self._min_x, self._max_x, self._min_y, self._max_y] + if None not in axis: + mpl.axis(axis) #gives warning when applied with mpl fig.set_tight_layout(True) mpl.xticks(rotation=self._x_rotation) @@ -437,6 +440,7 @@ class Roc(PlotBase): test_neg=None, test_pos=None, test_fta=None, test_file=None): ''' Plot ROC for dev and eval data using :py:func:`bob.measure.plot.roc`''' + mpl.figure(1) if self._test: linestyle = '-' if not self._split else LINESTYLES[idx % 14] plot.roc( @@ -474,7 +478,6 @@ class Roc(PlotBase): if self._fmr_at is not None: mpl.figure(1) mpl.plot([self._fmr_at, self._fmr_at], [0., 1.], "--", color='black') - mpl.axis([self._min_x, self._max_x, self._min_y, self._max_y]) super(Roc, self).end_process() class Det(PlotBase): @@ -487,6 +490,7 @@ class Det(PlotBase): test_neg=None, test_pos=None, test_fta=None, test_file=None): ''' Plot DET for dev and eval data using :py:func:`bob.measure.plot.det`''' + mpl.figure(1) if self._test and test_neg is not None: linestyle = '-' if not self._split else LINESTYLES[idx % 14] plot.det( -- GitLab