From 23015dc234b1c82de3ac00a5033beea49a4043dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Mon, 6 Jan 2025 12:44:44 +0100 Subject: [PATCH] Avoid UserWarning when vmin==vmax in std_dev plot --- src/ert/gui/tools/plot/plottery/plots/std_dev.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ert/gui/tools/plot/plottery/plots/std_dev.py b/src/ert/gui/tools/plot/plottery/plots/std_dev.py index 03aa2a77c5e..6c44bd654aa 100644 --- a/src/ert/gui/tools/plot/plottery/plots/std_dev.py +++ b/src/ert/gui/tools/plot/plottery/plots/std_dev.py @@ -108,8 +108,9 @@ def plot( im.set_norm(norm) padding = 0.05 * (vmax - vmin) - for ax_box in boxplot_axes: - ax_box.set_ylim(vmin - padding, vmax + padding) + if padding > 0.0: + for ax_box in boxplot_axes: + ax_box.set_ylim(vmin - padding, vmax + padding) @staticmethod def _colorbar(mappable: Any) -> Any: