Skip to content
Snippets Groups Projects
Commit 0bf1fd5c authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME
Browse files

Fix det plots: axis was broken with the previous commit

parent 32922124
No related branches found
No related tags found
2 merge requests!54Refactors the score loading and scripts functionality,!52generic plotting script for bob measure
Pipeline #
...@@ -394,9 +394,7 @@ class PlotBase(MeasureBase): ...@@ -394,9 +394,7 @@ class PlotBase(MeasureBase):
mpl.ylabel(self._y_label) mpl.ylabel(self._y_label)
mpl.grid(True, color=self._grid_color) mpl.grid(True, color=self._grid_color)
mpl.legend() mpl.legend()
axis = [self._min_x, self._max_x, self._min_y, self._max_y] self._set_axis()
if None not in axis:
mpl.axis(axis)
#gives warning when applied with mpl #gives warning when applied with mpl
fig.set_tight_layout(True) fig.set_tight_layout(True)
mpl.xticks(rotation=self._x_rotation) mpl.xticks(rotation=self._x_rotation)
...@@ -417,6 +415,11 @@ class PlotBase(MeasureBase): ...@@ -417,6 +415,11 @@ class PlotBase(MeasureBase):
return base + (" %d (%s)" % (idx + 1, name)) return base + (" %d (%s)" % (idx + 1, name))
return base + (" (%s)" % name) return base + (" (%s)" % name)
def _set_axis(self):
axis = [self._min_x, self._max_x, self._min_y, self._max_y]
if None not in axis:
mpl.axis(axis)
class Roc(PlotBase): class Roc(PlotBase):
''' Handles the plotting of ROC ''' Handles the plotting of ROC
...@@ -513,15 +516,10 @@ class Det(PlotBase): ...@@ -513,15 +516,10 @@ class Det(PlotBase):
label=self._label('development', dev_file, idx) label=self._label('development', dev_file, idx)
) )
def end_process(self): def _set_axis(self):
''' Set specific axis for det ''' axis = [self._min_x, self._max_x, self._min_y, self._max_y]
axlim = [self._min_x, self._max_x, self._min_y, self._max_y] if None not in axis:
mpl.figure(1) plot.det_axis(axis)
plot.det_axis(axlim)
if self._test and self._split:
mpl.figure(2)
plot.det_axis(axlim)
super(Det, self).end_process()
class Epc(PlotBase): class Epc(PlotBase):
''' Handles the plotting of EPC ''' ''' Handles the plotting of EPC '''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment