Commit 14e852f2 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME
Browse files

Change defaults behaviors for titles

parent c83442c1
Pipeline #18753 passed with stage
in 25 minutes and 14 seconds
......@@ -126,7 +126,7 @@ def show_dev_option(dflt=False, **kwargs):
'''Option to tell if should show dev histo'''
return bool_option('show-dev', 'D', 'If set, show dev histograms', dflt)
def print_filenames_option(dflt=False, **kwargs):
def print_filenames_option(dflt=True, **kwargs):
'''Option to tell if filenames should be in the title'''
return bool_option('show-fn', 'P', 'If set, show filenames in title', dflt)
......@@ -392,7 +392,7 @@ class PlotBase(MeasureBase):
self._axlim = None if 'axlim' not in ctx.meta else ctx.meta['axlim']
self._clayout = None if 'clayout' not in ctx.meta else\
self._print_fn = False if 'show_fn' not in ctx.meta else\
self._print_fn = True if 'show_fn' not in ctx.meta else\
self._x_rotation = None if 'x_rotation' not in ctx.meta else \
......@@ -657,12 +657,11 @@ class Hist(PlotBase):
self._get_neg_pos_thres(idx, dev_score, eval_score)
fig = mpl.figure()
mpl.title(self._get_title(dev_file, eval_file))
if eval_neg is not None and self._show_dev:
mpl.subplot(2, 1, 1)
mpl.title(self._get_title(dev_file, eval_file))
if self._show_dev:
self._setup_hist(dev_neg, dev_pos)
mpl.title(self._get_title(idx, dev_file, eval_file))
if eval_neg is not None and self._show_dev:
......@@ -679,6 +678,8 @@ class Hist(PlotBase):
eval_neg, eval_pos
if not self._show_dev:
mpl.title(self._get_title(idx, dev_file, eval_file))
mpl.ylabel('Eval. probability density')
#Setup lines, corresponding axis and legends
......@@ -689,7 +690,9 @@ class Hist(PlotBase):
def _get_title(self, dev_file, eval_file):
def _get_title(self, idx, dev_file, eval_file):
title = self._titles[idx] if self._titles is not None else None
if title is None:
title = self._title_base if not self._print_fn else \
('%s (%s)' % (
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment