diff --git a/tardis/tests/tests_slow/plot_helpers.py b/tardis/tests/tests_slow/plot_helpers.py index d9bca2c9c16..f6588a59a68 100644 --- a/tardis/tests/tests_slow/plot_helpers.py +++ b/tardis/tests/tests_slow/plot_helpers.py @@ -28,7 +28,7 @@ def upload(self, report): if report.passed: axes.text(0.8, 0.8, 'passed', transform=axes.transAxes, bbox={'facecolor': 'green', 'alpha': 0.5, 'pad': 10}) - elif report.failed: + else: axes.text(0.8, 0.8, 'failed', transform=axes.transAxes, bbox={'facecolor': 'red', 'alpha': 0.5, 'pad': 10}) diff --git a/tardis/tests/tests_slow/test_w7.py b/tardis/tests/tests_slow/test_w7.py index 3f221d46e13..db612530072 100644 --- a/tardis/tests/tests_slow/test_w7.py +++ b/tardis/tests/tests_slow/test_w7.py @@ -178,7 +178,19 @@ def plot_t_rads(self): ax.set_xlabel("Shell id") ax.set_ylabel("t_rads") - ax.plot(self.result.t_rads, color="blue", marker=".") + result_line = ax.plot(self.result.t_rads, color="blue", + marker=".", label="Result") + reference_line = ax.plot(self.reference['t_rads'], color="green", + marker=".", label="Reference") ax.axis([0, 28, 5000, 10000]) + error_ax = ax.twinx() + error_line = error_ax.plot((1 - self.result.t_rads / self.reference['t_rads']), + color="red", marker=".", label="Rel. Error") + error_ax.set_ylabel("Relative error (1 - result / reference)") + + lines = result_line + reference_line + error_line + labels = [l.get_label() for l in lines] + + ax.legend(lines, labels, loc="lower left") return figure