Skip to content

Commit

Permalink
Add avg std dev in std dev plot
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeda committed Aug 23, 2024
1 parent fbfd095 commit be2d52b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/ert/gui/plottery/plots/std_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ def plot(
images.append(data)
vmin = min(vmin, float(np.min(data)))
vmax = max(vmax, float(np.max(data)))
ax.set_title(
f"{ensemble.experiment_name} : {ensemble.name} layer={layer}",
wrap=True,
)

# Calculate average standard deviation
avg_std_dev = np.mean(data)

# Add average standard deviation to the title
ax.set_title(
f"{ensemble.experiment_name}:{ensemble.name}\n"
f"layer={layer}\n avg={avg_std_dev:.2f}",
wrap=True,
)

norm = plt.Normalize(vmin, vmax)
for ax, data in zip(axes, images):
Expand Down

0 comments on commit be2d52b

Please sign in to comment.