diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py index 5dbc14a39fefb5770cbc5d22ebf198eec516bf53..dfffe6f2d06d62d13a45589e4c3e7942b6200dce 100644 --- a/mlair/plotting/postprocessing_plotting.py +++ b/mlair/plotting/postprocessing_plotting.py @@ -1378,6 +1378,8 @@ class PlotSampleUncertaintyFromBootstrap(AbstractPlotClass): # pragma: no cover x2 = i y = data_table[[self.model_name, data_table.columns[i]]].max().max() y = max(y, y_prev) * 1.025 + if abs(y-y_prev) < y * 0.025: + y = y * 1.025 h = .01 * data_table.max().max() ax.plot([x1, x1, x2, x2], [y, y + h, y + h, y], c="k") ax.text((x1 + x2) * .5, y + h, v, ha="center", va="bottom", color="k") @@ -1392,6 +1394,8 @@ class PlotSampleUncertaintyFromBootstrap(AbstractPlotClass): # pragma: no cover y2 = i x = data_table[[self.model_name, data_table.columns[i]]].max().max() x = max(x, x_prev) * 1.025 + if abs(x-x_prev) < x * 0.025: + x = x * 1.025 h = .01 * data_table.max().max() ax.plot([x, x+h, x+h, x], [y1, y1, y2, y2], c="k") ax.text(x + h, (y1 + y2) * .5, v, ha="left", va="center", color="k", rotation=-90)