Skip to content

Commit e77e2f2

Browse files
committed
Add lines for all model samples
1 parent 2a5eded commit e77e2f2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

unseen/moments.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ def create_plot(
154154

155155
if da_bc_fcst is not None:
156156
da_bc_fcst_stacked = da_bc_fcst.dropna(lead_dim).stack({"sample": dims})
157+
moments_bc_fcst = calc_moments(da_bc_fcst_stacked, core_dim="sample", **kwargs)
157158

158159
bootstrap_values = {}
159160
bootstrap_lower_ci = {}
@@ -245,6 +246,9 @@ def create_plot(
245246
ax.axvline(
246247
moments_obs[moment], linewidth=4.0, color="tab:gray", label="observations"
247248
)
249+
ax.axvline(
250+
moments_fcst[moment], linewidth=4.0, color="tab:blue"
251+
)
248252
if da_bc_fcst is not None:
249253
ax.hist(
250254
bc_bootstrap_values[moment],
@@ -265,6 +269,11 @@ def create_plot(
265269
linestyle="--",
266270
linewidth=3.0,
267271
)
272+
ax.axvline(
273+
moments_bc_fcst[moment],
274+
linewidth=4.0,
275+
color="tab:orange"
276+
)
268277
ax.set_ylabel("count", fontsize="large")
269278
ax.set_xlabel(units[moment], fontsize="large")
270279
letter = letters[plotnum]

0 commit comments

Comments
 (0)