Skip to content

Commit

Permalink
Avoid UserWarning when vmin==vmax in std_dev plot
Browse files Browse the repository at this point in the history
  • Loading branch information
berland authored and sondreso committed Jan 7, 2025
1 parent a6d2dba commit 23015dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ert/gui/tools/plot/plottery/plots/std_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 23015dc

Please sign in to comment.