Commit 3887fb6d authored by Alex UNNERVIK's avatar Alex UNNERVIK

Updated histogram plots to share x and y axis scales across dev and eval among same systems

parent 9fd76ffb
Pipeline #38959 passed with stage
in 10 minutes and 27 seconds
......@@ -882,12 +882,15 @@ class GridSubplot(PlotBase):
def create_subplot(self, n):
def create_subplot(self, n, shared_axis=None):
i, j = numpy.unravel_index(n, (self._nrows, self._ncols))
i1 = i * self._row_times + self._grid_axis_offset
i2 = (i + 1) * self._row_times + self._grid_axis_offset
j1, j2 = j * self._col_times, (j + 1) * self._col_times
axis = mpl.gcf().add_subplot(self._gs[i1:i2, j1:j2])
if shared_axis is not None:
axis = mpl.gcf().add_subplot(self._gs[i1:i2, j1:j2], sharex=shared_axis, sharey=shared_axis)
axis = mpl.gcf().add_subplot(self._gs[i1:i2, j1:j2])
return axis
def finalize_one_page(self):
......@@ -966,23 +969,26 @@ class Hist(GridSubplot):
col = idx % self._ncols
idx = col + self._ncols * row
dev_axis = None
if not self._hide_dev or not self._eval:
dev_axis = self._print_subplot(
idx, sys, dev_neg, dev_pos, threshold, not self._no_line, False
if self._eval:
idx += self._ncols if not self._hide_dev else 0
idx, sys, eval_neg, eval_pos, threshold, not self._no_line, True
idx, sys, eval_neg, eval_pos, threshold, not self._no_line, True,
def _print_subplot(self, idx, sys, neg, pos, threshold, draw_line, evaluation):
def _print_subplot(self, idx, sys, neg, pos, threshold, draw_line, evaluation,
""" print a subplot for the given score and subplot index"""
n = idx % self._step_print
col = n % self._ncols
sub_plot_idx = n + 1
axis = self.create_subplot(n)
axis = self.create_subplot(n, shared_axis)
self._setup_hist(neg, pos)
if col == 0:
......@@ -1015,6 +1021,7 @@ class Hist(GridSubplot):
# to display, save figure
if self._step_print == sub_plot_idx or (is_lower and sys == self.n_systems - 1):
return axis
def _get_title(self, idx, dflt=None):
""" Get the histo title for the given idx"""

    Here you will find a set of scores, a script which generates plot combinations and a copy of the generated plots.

    Please update the path to the bob binary in the script which contains the update in this commit if you want to use the script and compare the outputs of the plots generated.

Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment