From 259538f0b0ff705d16b934c4c6c0e10b3ecca91e Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 21 Sep 2017 10:54:34 +0200 Subject: [PATCH] [minor] add some description to exp. histograms --- pylot/core/util/widgets.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index a8e0bacf..afe12eb5 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -371,6 +371,15 @@ class ComparisonWidget(QWidget): _anno_exp.draggable() axes_dict[phase]['exp'].set_xlabel('Time [s]') + # add colors (early, late) for expectation + ax = axes_dict[phase]['exp'] + xlims = ax.get_xlim() + ylims = ax.get_ylim() + ax.fill_between([xlims[0], 0], ylims[0], ylims[1], color=(0.9, 1.0, 0.9, 0.5), label='earlier than manual') + ax.fill_between([0, xlims[1]], ylims[0], ylims[1], color=(1.0, 0.9, 0.9, 0.5), label='later than manual') + legend = ax.legend() + legend.draggable() + for ax in axes_dict['P'].values(): ax.set_ylabel('Frequency [-]')