Skip to content

Commit 605cf2f

Browse files
committed
Adjust plots
1 parent 3f30482 commit 605cf2f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/plot_ensemble_verification.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,22 +148,22 @@
148148
# compute and plot the ROC curve
149149
roc = verification.ROC_curve_init(0.1, n_prob_thrs=10)
150150
verification.ROC_curve_accum(roc, P_f, R_o[-1, :, :])
151-
fig = figure()
152-
verification.plot_ROC(roc, ax=fig.gca(), opt_prob_thr=True)
153-
title("ROC curve (+ %i min)" % (n_leadtimes * timestep))
151+
fig, ax = subplots()
152+
verification.plot_ROC(roc, ax, opt_prob_thr=True)
153+
ax.set_title("ROC curve (+ %i min)" % (n_leadtimes * timestep))
154154

155155
# compute and plot the reliability diagram
156156
reldiag = verification.reldiag_init(0.1)
157157
verification.reldiag_accum(reldiag, P_f, R_o[-1, :, :])
158-
fig = figure()
159-
verification.plot_reldiag(reldiag, ax=fig.gca())
160-
title("Reliability diagram (+ %i min)" % (n_leadtimes * timestep))
158+
fig, ax = subplots()
159+
verification.plot_reldiag(reldiag, ax)
160+
ax.set_title("Reliability diagram (+ %i min)" % (n_leadtimes * timestep))
161161

162162
# compute and plot the rank histogram
163163
rankhist = verification.rankhist_init(R_f.shape[0], 0.1)
164164
verification.rankhist_accum(rankhist, R_f[:, -1, :, :], R_o[-1, :, :])
165-
fig = figure()
166-
verification.plot_rankhist(rankhist, ax=fig.gca())
167-
title("Rank histogram (+ %i min)" % (n_leadtimes * timestep))
165+
fig, ax = subplots()
166+
verification.plot_rankhist(rankhist, ax)
167+
ax.set_title("Rank histogram (+ %i min)" % (n_leadtimes * timestep))
168168

169169
# sphinx_gallery_thumbnail_number = 5

0 commit comments

Comments
 (0)